"undefined" == typeof faultylabs && (faultylabs = {}),
faultylabs.MD5 = function(e) {
    function t(e, t, r) {
        return e & t | ~e & r
    }
    function r(e, t, r) {
        return r & e | ~r & t
    }
    function i(e, t) {
        return e[t + 3] << 24 | e[t + 2] << 16 | e[t + 1] << 8 | e[t]
    }
    function n(e) {
        for (var t = [], r = 0; r < e.length; r++)
            if (e.charCodeAt(r) <= 127)
                t.push(e.charCodeAt(r));
            else
                for (var i = encodeURIComponent(e.charAt(r)).substr(1).split("%"), n = 0; n < i.length; n++)
                    t.push(parseInt(i[n], 16));
        return t
    }
    function o(e) {
        for (var t = new Array(e.length), r = 0; r < e.length; r++)
            t[r] = e[r];
        return t
    }
    function s(e, t) {
        return 4294967295 & e + t
    }
    var a = null
      , g = null;
    function c(e, t, r, i) {
        var n = U;
        U = y,
        K = s(y = K, (e = s(h, s(e, s(t, r)))) << i & 4294967295 | e >>> 32 - i),
        h = n
    }
    "string" == typeof e ? a = n(e) : e.constructor == Array ? 0 === e.length ? a = e : "string" == typeof e[0] ? a = function(e) {
        for (var t = [], r = 0; r < e.length; r++)
            t = t.concat(n(e[r]));
        return t
    }(e) : "number" == typeof e[0] ? a = e : g = typeof e[0] : "undefined" != typeof ArrayBuffer ? e instanceof ArrayBuffer ? a = o(new Uint8Array(e)) : e instanceof Uint8Array || e instanceof Int8Array ? a = o(e) : e instanceof Uint32Array || e instanceof Int32Array || e instanceof Uint16Array || e instanceof Int16Array || e instanceof Float32Array || e instanceof Float64Array ? a = o(new Uint8Array(e.buffer)) : g = typeof e : g = typeof e,
    g && alert("MD5 type mismatch, cannot process " + g);
    var e = a.length
      , d = (a.push(128),
    a.length % 64);
    if (56 < d) {
        for (var u = 0; u < 64 - d; u++)
            a.push(0);
        d = a.length % 64
    }
    for (u = 0; u < 56 - d; u++)
        a.push(0);
    a = a.concat(function(e) {
        for (var t = [], r = 0; r < 8; r++)
            t.push(255 & e),
            e >>>= 8;
        return t
    }(8 * e));
    for (var l = 1732584193, p = 4023233417, f = 2562383102, m = 271733878, h = 0, K = 0, y = 0, U = 0, u = 0; u < a.length / 64; u++) {
        var h = l
          , v = 64 * u;
        c(t(K = p, y = f, U = m), 3614090360, i(a, v), 7),
        c(t(K, y, U), 3905402710, i(a, 4 + v), 12),
        c(t(K, y, U), 606105819, i(a, 8 + v), 17),
        c(t(K, y, U), 3250441966, i(a, 12 + v), 22),
        c(t(K, y, U), 4118548399, i(a, 16 + v), 7),
        c(t(K, y, U), 1200080426, i(a, 20 + v), 12),
        c(t(K, y, U), 2821735955, i(a, 24 + v), 17),
        c(t(K, y, U), 4249261313, i(a, 28 + v), 22),
        c(t(K, y, U), 1770035416, i(a, 32 + v), 7),
        c(t(K, y, U), 2336552879, i(a, 36 + v), 12),
        c(t(K, y, U), 4294925233, i(a, 40 + v), 17),
        c(t(K, y, U), 2304563134, i(a, 44 + v), 22),
        c(t(K, y, U), 1804603682, i(a, 48 + v), 7),
        c(t(K, y, U), 4254626195, i(a, 52 + v), 12),
        c(t(K, y, U), 2792965006, i(a, 56 + v), 17),
        c(t(K, y, U), 1236535329, i(a, 60 + v), 22),
        c(r(K, y, U), 4129170786, i(a, 4 + v), 5),
        c(r(K, y, U), 3225465664, i(a, 24 + v), 9),
        c(r(K, y, U), 643717713, i(a, 44 + v), 14),
        c(r(K, y, U), 3921069994, i(a, v), 20),
        c(r(K, y, U), 3593408605, i(a, 20 + v), 5),
        c(r(K, y, U), 38016083, i(a, 40 + v), 9),
        c(r(K, y, U), 3634488961, i(a, 60 + v), 14),
        c(r(K, y, U), 3889429448, i(a, 16 + v), 20),
        c(r(K, y, U), 568446438, i(a, 36 + v), 5),
        c(r(K, y, U), 3275163606, i(a, 56 + v), 9),
        c(r(K, y, U), 4107603335, i(a, 12 + v), 14),
        c(r(K, y, U), 1163531501, i(a, 32 + v), 20),
        c(r(K, y, U), 2850285829, i(a, 52 + v), 5),
        c(r(K, y, U), 4243563512, i(a, 8 + v), 9),
        c(r(K, y, U), 1735328473, i(a, 28 + v), 14),
        c(r(K, y, U), 2368359562, i(a, 48 + v), 20),
        c(K ^ y ^ U, 4294588738, i(a, 20 + v), 4),
        c(K ^ y ^ U, 2272392833, i(a, 32 + v), 11),
        c(K ^ y ^ U, 1839030562, i(a, 44 + v), 16),
        c(K ^ y ^ U, 4259657740, i(a, 56 + v), 23),
        c(K ^ y ^ U, 2763975236, i(a, 4 + v), 4),
        c(K ^ y ^ U, 1272893353, i(a, 16 + v), 11),
        c(K ^ y ^ U, 4139469664, i(a, 28 + v), 16),
        c(K ^ y ^ U, 3200236656, i(a, 40 + v), 23),
        c(K ^ y ^ U, 681279174, i(a, 52 + v), 4),
        c(K ^ y ^ U, 3936430074, i(a, v), 11),
        c(K ^ y ^ U, 3572445317, i(a, 12 + v), 16),
        c(K ^ y ^ U, 76029189, i(a, 24 + v), 23),
        c(K ^ y ^ U, 3654602809, i(a, 36 + v), 4),
        c(K ^ y ^ U, 3873151461, i(a, 48 + v), 11),
        c(K ^ y ^ U, 530742520, i(a, 60 + v), 16),
        c(K ^ y ^ U, 3299628645, i(a, 8 + v), 23),
        c(y ^ (K | ~U), 4096336452, i(a, v), 6),
        c(y ^ (K | ~U), 1126891415, i(a, 28 + v), 10),
        c(y ^ (K | ~U), 2878612391, i(a, 56 + v), 15),
        c(y ^ (K | ~U), 4237533241, i(a, 20 + v), 21),
        c(y ^ (K | ~U), 1700485571, i(a, 48 + v), 6),
        c(y ^ (K | ~U), 2399980690, i(a, 12 + v), 10),
        c(y ^ (K | ~U), 4293915773, i(a, 40 + v), 15),
        c(y ^ (K | ~U), 2240044497, i(a, 4 + v), 21),
        c(y ^ (K | ~U), 1873313359, i(a, 32 + v), 6),
        c(y ^ (K | ~U), 4264355552, i(a, 60 + v), 10),
        c(y ^ (K | ~U), 2734768916, i(a, 24 + v), 15),
        c(y ^ (K | ~U), 1309151649, i(a, 52 + v), 21),
        c(y ^ (K | ~U), 4149444226, i(a, 16 + v), 6),
        c(y ^ (K | ~U), 3174756917, i(a, 44 + v), 10),
        c(y ^ (K | ~U), 718787259, i(a, 8 + v), 15),
        c(y ^ (K | ~U), 3951481745, i(a, 36 + v), 21),
        l = s(l, h),
        p = s(p, K),
        f = s(f, y),
        m = s(m, U)
    }
    return function() {
        for (var e, t = "", r = 3; 0 <= r; r--)
            t += (e = ((e = (((255 & (e = arguments[r])) << 8 | 255 & (e >>>= 8)) << 8 | 255 & (e >>>= 8)) << 8 | (e >>>= 8)) >>> 0).toString(16),
            "00000000".substr(0, 8 - e.length) + e);
        return t
    }(m, f, p, l).toUpperCase()
}
,
!function() {
    function e(e, n, t) {
        n = n || "";
        var o, r, i = !1, s = "json", a = ("function" == typeof (t = t || {}) ? o = t : (o = t.callback,
        i = t.useH5 || !1,
        s = t.postType || "json"),
        {});
        for (r in e = e || {})
            a[r] || (a[r] = e[r]);
        function g() {
            for (var e in U)
                f.push(e);
            !function r(i) {
                if (i < f.length)
                    U[f[i]](function(e) {
                        if (e)
                            if ("[object Object]" == Object.prototype.toString.call(e))
                                for (var t in e)
                                    m[t] = e[t];
                            else
                                m[f[i]] = e;
                        r(i + 1)
                    });
                else {
                    for (var e in m)
                        a[e] || (a[e] = m[e]);
                    for (var e in a)
                        h.push(e);
                    if (h.sort(),
                    h.forEach(function(e) {
                        K.push(e + "=" + a[e])
                    }),
                    n)
                        if ("[object Object]" == Object.prototype.toString.call(n))
                            if ("json" == s)
                                K.push(JSON.stringify(n));
                            else {
                                var t = [];
                                for (e in n)
                                    t.push(e + "=" + n[e]);
                                K.push(t.join("&"))
                            }
                        else
                            K.push(n);
                    K.unshift(y),
                    K.push(y),
                    a.signature = faultylabs.MD5(K.join("")),
                    o && o(a)
                }
            }(0)
        }
        t = !!navigator.userAgent.match(/KGBrowser/gi),
        u = !!navigator.userAgent.match(/kugouandroid/gi);
        var c, d, u, l = "undefined" != typeof external && void 0 !== external.superCall || u || t, p = (new Date).getTime(), f = [], m = {}, h = [], 
        K = [], 
        y = "NVPh5oo715z5DIWAeQlhMDsWXXQV4hwt", U = {
            appid: function(e) {
                return e()
            },
            srcappid: function(e) {
                return e("2919")
            },
            clientver: function(e) {
                return e("20000")
            },
            "clienttime,mid,uuid,dfid": function(e) {
                return e({
                    clienttime: p,
                    mid: p,
                    uuid: p,
                    dfid: "-"
                })
            }
        };
        (l = !n || "[object Object]" == Object.prototype.toString.call(n) && "urlencoded" != s ? l : !1) && !i ? (c = !1,
        d = function() {
            KgMobileCall.callCmd({
                cmd: 764,
                jsonStr: JSON.stringify({
                    get: a,
                    post: n
                }),
                callback: function(e) {
                    if (c)
                        return !1;
                    if (c = !0,
                    e && e.status) {
                        for (var t in delete e.status,
                        e)
                            a[t] || (a[t] = e[t]);
                        return o && o(a)
                    }
                    l = !1,
                    g()
                }
            })
        }
        ,
        window.KgMobileCall ? d && d() : ((u = document.createElement("script")).src = "https://m3ws.kugou.com/static/js/common/mobilecall_3.0.js",
        u.onload = function() {
            this.readyState && "loaded" != this.readyState && "complete" != this.readyState || d && d()
        }
        ,
        document.body.appendChild(u))) : (l = !1,
        g())
    }
    "undefined" != typeof module && module.exports ? module.exports = e : "function" == typeof define && define.amd ? define(function() {
        return e
    }) : window.getInterFaceKguser = e
}(),
!function(e, t) {
    "object" == typeof exports && "undefined" != typeof module ? module.exports = t(require("crypto")) : "function" == typeof define && define.amd ? define(["crypto"], t) : (e = e || self).AES = t(e.crypto)
}(this, function(f) {
    "use strict";
    f = f && f.hasOwnProperty("default") ? f.default : f;
    var h = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
    function e(e, t) {
        return e(t = {
            exports: {}
        }, t.exports),
        t.exports
    }
    var m = e(function(e, t) {
        e.exports = (e = function(c) {
            var i;
            if (!(i = !(i = !(i = "undefined" != typeof window && window.crypto ? window.crypto : i) && "undefined" != typeof window && window.msCrypto ? window.msCrypto : i) && void 0 !== h && h.crypto ? h.crypto : i))
                try {
                    i = f
                } catch (e) {}
            var r = Object.create || function(e) {
                return t.prototype = e,
                e = new t,
                t.prototype = null,
                e
            }
            ;
            function t() {}
            var e = {}
              , n = e.lib = {}
              , o = n.Base = {
                extend: function(e) {
                    var t = r(this);
                    return e && t.mixIn(e),
                    t.hasOwnProperty("init") && this.init !== t.init || (t.init = function() {
                        t.$super.init.apply(this, arguments)
                    }
                    ),
                    (t.init.prototype = t).$super = this,
                    t
                },
                create: function() {
                    var e = this.extend();
                    return e.init.apply(e, arguments),
                    e
                },
                init: function() {},
                mixIn: function(e) {
                    for (var t in e)
                        e.hasOwnProperty(t) && (this[t] = e[t]);
                    e.hasOwnProperty("toString") && (this.toString = e.toString)
                },
                clone: function() {
                    return this.init.prototype.extend(this)
                }
            }
              , d = n.WordArray = o.extend({
                init: function(e, t) {
                    e = this.words = e || [],
                    this.sigBytes = null != t ? t : 4 * e.length
                },
                toString: function(e) {
                    return (e || a).stringify(this)
                },
                concat: function(e) {
                    var t = this.words
                      , r = e.words
                      , i = this.sigBytes
                      , n = e.sigBytes;
                    if (this.clamp(),
                    i % 4)
                        for (var o = 0; o < n; o++) {
                            var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255;
                            t[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8
                        }
                    else
                        for (o = 0; o < n; o += 4)
                            t[i + o >>> 2] = r[o >>> 2];
                    return this.sigBytes += n,
                    this
                },
                clamp: function() {
                    var e = this.words
                      , t = this.sigBytes;
                    e[t >>> 2] &= 4294967295 << 32 - t % 4 * 8,
                    e.length = c.ceil(t / 4)
                },
                clone: function() {
                    var e = o.clone.call(this);
                    return e.words = this.words.slice(0),
                    e
                },
                random: function(e) {
                    for (var t = [], r = 0; r < e; r += 4)
                        t.push(function() {
                            if (i) {
                                if ("function" == typeof i.getRandomValues)
                                    try {
                                        return i.getRandomValues(new Uint32Array(1))[0]
                                    } catch (e) {}
                                if ("function" == typeof i.randomBytes)
                                    try {
                                        return i.randomBytes(4).readInt32LE()
                                    } catch (e) {}
                            }
                            throw new Error("Native crypto module could not be used to get secure random number.")
                        }());
                    return new d.init(t,e)
                }
            })
              , s = e.enc = {}
              , a = s.Hex = {
                stringify: function(e) {
                    for (var t = e.words, r = e.sigBytes, i = [], n = 0; n < r; n++) {
                        var o = t[n >>> 2] >>> 24 - n % 4 * 8 & 255;
                        i.push((o >>> 4).toString(16)),
                        i.push((15 & o).toString(16))
                    }
                    return i.join("")
                },
                parse: function(e) {
                    for (var t = e.length, r = [], i = 0; i < t; i += 2)
                        r[i >>> 3] |= parseInt(e.substr(i, 2), 16) << 24 - i % 8 * 4;
                    return new d.init(r,t / 2)
                }
            }
              , g = s.Latin1 = {
                stringify: function(e) {
                    for (var t = e.words, r = e.sigBytes, i = [], n = 0; n < r; n++) {
                        var o = t[n >>> 2] >>> 24 - n % 4 * 8 & 255;
                        i.push(String.fromCharCode(o))
                    }
                    return i.join("")
                },
                parse: function(e) {
                    for (var t = e.length, r = [], i = 0; i < t; i++)
                        r[i >>> 2] |= (255 & e.charCodeAt(i)) << 24 - i % 4 * 8;
                    return new d.init(r,t)
                }
            }
              , u = s.Utf8 = {
                stringify: function(e) {
                    try {
                        return decodeURIComponent(escape(g.stringify(e)))
                    } catch (e) {
                        throw new Error("Malformed UTF-8 data")
                    }
                },
                parse: function(e) {
                    return g.parse(unescape(encodeURIComponent(e)))
                }
            }
              , l = n.BufferedBlockAlgorithm = o.extend({
                reset: function() {
                    this._data = new d.init,
                    this._nDataBytes = 0
                },
                _append: function(e) {
                    "string" == typeof e && (e = u.parse(e)),
                    this._data.concat(e),
                    this._nDataBytes += e.sigBytes
                },
                _process: function(e) {
                    var t, r = this._data, i = r.words, n = r.sigBytes, o = this.blockSize, s = n / (4 * o), a = (s = e ? c.ceil(s) : c.max((0 | s) - this._minBufferSize, 0)) * o, e = c.min(4 * a, n);
                    if (a) {
                        for (var g = 0; g < a; g += o)
                            this._doProcessBlock(i, g);
                        t = i.splice(0, a),
                        r.sigBytes -= e
                    }
                    return new d.init(t,e)
                },
                clone: function() {
                    var e = o.clone.call(this);
                    return e._data = this._data.clone(),
                    e
                },
                _minBufferSize: 0
            })
              , p = (n.Hasher = l.extend({
                cfg: o.extend(),
                init: function(e) {
                    this.cfg = this.cfg.extend(e),
                    this.reset()
                },
                reset: function() {
                    l.reset.call(this),
                    this._doReset()
                },
                update: function(e) {
                    return this._append(e),
                    this._process(),
                    this
                },
                finalize: function(e) {
                    return e && this._append(e),
                    this._doFinalize()
                },
                blockSize: 16,
                _createHelper: function(r) {
                    return function(e, t) {
                        return new r.init(t).finalize(e)
                    }
                },
                _createHmacHelper: function(r) {
                    return function(e, t) {
                        return new p.HMAC.init(r,t).finalize(e)
                    }
                }
            }),
            e.algo = {});
            return e
        }(Math),
        e)
    })
      , n = e(function(e, t) {
        function s(e, t, r) {
            for (var i, n, o = [], s = 0, a = 0; a < t; a++)
                a % 4 && (i = r[e.charCodeAt(a - 1)] << a % 4 * 2,
                n = r[e.charCodeAt(a)] >>> 6 - a % 4 * 2,
                o[s >>> 2] |= (i | n) << 24 - s % 4 * 8,
                s++);
            return g.create(o, s)
        }
        var g;
        e.exports = (g = (e = m).lib.WordArray,
        e.enc.Base64 = {
            stringify: function(e) {
                for (var t = e.words, r = e.sigBytes, i = this._map, n = (e.clamp(),
                []), o = 0; o < r; o += 3)
                    for (var s = (t[o >>> 2] >>> 24 - o % 4 * 8 & 255) << 16 | (t[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255) << 8 | t[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, a = 0; a < 4 && o + .75 * a < r; a++)
                        n.push(i.charAt(s >>> 6 * (3 - a) & 63));
                var g = i.charAt(64);
                if (g)
                    for (; n.length % 4; )
                        n.push(g);
                return n.join("")
            },
            parse: function(e) {
                var t = e.length
                  , r = this._map;
                if (!(i = this._reverseMap))
                    for (var i = this._reverseMap = [], n = 0; n < r.length; n++)
                        i[r.charCodeAt(n)] = n;
                var o = r.charAt(64);
                return o && -1 !== (o = e.indexOf(o)) && (t = o),
                s(e, t, i)
            },
            _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
        },
        e.enc.Base64)
    })
      , o = (e(function(e, t) {
        e.exports = function(e) {
            for (var d = Math, t = e, r = t.lib, i = r.WordArray, n = r.Hasher, o = t.algo, I = [], s = 0; s < 64; s++)
                I[s] = d.abs(d.sin(s + 1)) * 4294967296 | 0;
            var a = o.MD5 = n.extend({
                _doReset: function() {
                    this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878])
                },
                _doProcessBlock: function(e, t) {
                    for (var r = 0; r < 16; r++) {
                        var i = t + r;
                        var n = e[i];
                        e[i] = (n << 8 | n >>> 24) & 16711935 | (n << 24 | n >>> 8) & 4278255360
                    }
                    var o = this._hash.words;
                    var s = e[t + 0];
                    var a = e[t + 1];
                    var g = e[t + 2];
                    var c = e[t + 3];
                    var d = e[t + 4];
                    var u = e[t + 5];
                    var l = e[t + 6];
                    var p = e[t + 7];
                    var f = e[t + 8];
                    var m = e[t + 9];
                    var h = e[t + 10];
                    var K = e[t + 11];
                    var y = e[t + 12];
                    var U = e[t + 13];
                    var v = e[t + 14];
                    var k = e[t + 15];
                    var C = o[0];
                    var _ = o[1];
                    var w = o[2];
                    var b = o[3];
                    C = S(C, _, w, b, s, 7, I[0]);
                    b = S(b, C, _, w, a, 12, I[1]);
                    w = S(w, b, C, _, g, 17, I[2]);
                    _ = S(_, w, b, C, c, 22, I[3]);
                    C = S(C, _, w, b, d, 7, I[4]);
                    b = S(b, C, _, w, u, 12, I[5]);
                    w = S(w, b, C, _, l, 17, I[6]);
                    _ = S(_, w, b, C, p, 22, I[7]);
                    C = S(C, _, w, b, f, 7, I[8]);
                    b = S(b, C, _, w, m, 12, I[9]);
                    w = S(w, b, C, _, h, 17, I[10]);
                    _ = S(_, w, b, C, K, 22, I[11]);
                    C = S(C, _, w, b, y, 7, I[12]);
                    b = S(b, C, _, w, U, 12, I[13]);
                    w = S(w, b, C, _, v, 17, I[14]);
                    _ = S(_, w, b, C, k, 22, I[15]);
                    C = T(C, _, w, b, a, 5, I[16]);
                    b = T(b, C, _, w, l, 9, I[17]);
                    w = T(w, b, C, _, K, 14, I[18]);
                    _ = T(_, w, b, C, s, 20, I[19]);
                    C = T(C, _, w, b, u, 5, I[20]);
                    b = T(b, C, _, w, h, 9, I[21]);
                    w = T(w, b, C, _, k, 14, I[22]);
                    _ = T(_, w, b, C, d, 20, I[23]);
                    C = T(C, _, w, b, m, 5, I[24]);
                    b = T(b, C, _, w, v, 9, I[25]);
                    w = T(w, b, C, _, c, 14, I[26]);
                    _ = T(_, w, b, C, f, 20, I[27]);
                    C = T(C, _, w, b, U, 5, I[28]);
                    b = T(b, C, _, w, g, 9, I[29]);
                    w = T(w, b, C, _, p, 14, I[30]);
                    _ = T(_, w, b, C, y, 20, I[31]);
                    C = A(C, _, w, b, u, 4, I[32]);
                    b = A(b, C, _, w, f, 11, I[33]);
                    w = A(w, b, C, _, K, 16, I[34]);
                    _ = A(_, w, b, C, v, 23, I[35]);
                    C = A(C, _, w, b, a, 4, I[36]);
                    b = A(b, C, _, w, d, 11, I[37]);
                    w = A(w, b, C, _, p, 16, I[38]);
                    _ = A(_, w, b, C, h, 23, I[39]);
                    C = A(C, _, w, b, U, 4, I[40]);
                    b = A(b, C, _, w, s, 11, I[41]);
                    w = A(w, b, C, _, c, 16, I[42]);
                    _ = A(_, w, b, C, l, 23, I[43]);
                    C = A(C, _, w, b, m, 4, I[44]);
                    b = A(b, C, _, w, y, 11, I[45]);
                    w = A(w, b, C, _, k, 16, I[46]);
                    _ = A(_, w, b, C, g, 23, I[47]);
                    C = E(C, _, w, b, s, 6, I[48]);
                    b = E(b, C, _, w, p, 10, I[49]);
                    w = E(w, b, C, _, v, 15, I[50]);
                    _ = E(_, w, b, C, u, 21, I[51]);
                    C = E(C, _, w, b, y, 6, I[52]);
                    b = E(b, C, _, w, c, 10, I[53]);
                    w = E(w, b, C, _, h, 15, I[54]);
                    _ = E(_, w, b, C, a, 21, I[55]);
                    C = E(C, _, w, b, f, 6, I[56]);
                    b = E(b, C, _, w, k, 10, I[57]);
                    w = E(w, b, C, _, l, 15, I[58]);
                    _ = E(_, w, b, C, U, 21, I[59]);
                    C = E(C, _, w, b, d, 6, I[60]);
                    b = E(b, C, _, w, K, 10, I[61]);
                    w = E(w, b, C, _, g, 15, I[62]);
                    _ = E(_, w, b, C, m, 21, I[63]);
                    o[0] = o[0] + C | 0;
                    o[1] = o[1] + _ | 0;
                    o[2] = o[2] + w | 0;
                    o[3] = o[3] + b | 0
                },
                _doFinalize: function() {
                    var e = this._data;
                    var t = e.words;
                    var r = this._nDataBytes * 8;
                    var i = e.sigBytes * 8;
                    t[i >>> 5] |= 128 << 24 - i % 32;
                    var n = d.floor(r / 4294967296);
                    var o = r;
                    t[(i + 64 >>> 9 << 4) + 15] = (n << 8 | n >>> 24) & 16711935 | (n << 24 | n >>> 8) & 4278255360;
                    t[(i + 64 >>> 9 << 4) + 14] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
                    e.sigBytes = (t.length + 1) * 4;
                    this._process();
                    var s = this._hash;
                    var a = s.words;
                    for (var g = 0; g < 4; g++) {
                        var c = a[g];
                        a[g] = (c << 8 | c >>> 24) & 16711935 | (c << 24 | c >>> 8) & 4278255360
                    }
                    return s
                },
                clone: function() {
                    var e = n.clone.call(this);
                    e._hash = this._hash.clone();
                    return e
                }
            });
            function S(e, t, r, i, n, o, s) {
                var a = e + (t & r | ~t & i) + n + s;
                return (a << o | a >>> 32 - o) + t
            }
            function T(e, t, r, i, n, o, s) {
                var a = e + (t & i | r & ~i) + n + s;
                return (a << o | a >>> 32 - o) + t
            }
            function A(e, t, r, i, n, o, s) {
                var a = e + (t ^ r ^ i) + n + s;
                return (a << o | a >>> 32 - o) + t
            }
            function E(e, t, r, i, n, o, s) {
                var a = e + (r ^ (t | ~i)) + n + s;
                return (a << o | a >>> 32 - o) + t
            }
            return t.MD5 = n._createHelper(a),
            t.HmacMD5 = n._createHmacHelper(a),
            e.MD5
        }(m)
    }),
    e(function(e, t) {
        var r, i, n, d, o;
        e.exports = (o = (r = e = m).lib,
        i = o.WordArray,
        n = o.Hasher,
        o = r.algo,
        d = [],
        o = o.SHA1 = n.extend({
            _doReset: function() {
                this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520])
            },
            _doProcessBlock: function(e, t) {
                for (var r = this._hash.words, i = r[0], n = r[1], o = r[2], s = r[3], a = r[4], g = 0; g < 80; g++) {
                    g < 16 ? d[g] = 0 | e[t + g] : (c = d[g - 3] ^ d[g - 8] ^ d[g - 14] ^ d[g - 16],
                    d[g] = c << 1 | c >>> 31);
                    var c = (i << 5 | i >>> 27) + a + d[g];
                    c += g < 20 ? 1518500249 + (n & o | ~n & s) : g < 40 ? 1859775393 + (n ^ o ^ s) : g < 60 ? (n & o | n & s | o & s) - 1894007588 : (n ^ o ^ s) - 899497514,
                    a = s,
                    s = o,
                    o = n << 30 | n >>> 2,
                    n = i,
                    i = c
                }
                r[0] = r[0] + i | 0,
                r[1] = r[1] + n | 0,
                r[2] = r[2] + o | 0,
                r[3] = r[3] + s | 0,
                r[4] = r[4] + a | 0
            },
            _doFinalize: function() {
                var e = this._data
                  , t = e.words
                  , r = 8 * this._nDataBytes
                  , i = 8 * e.sigBytes;
                return t[i >>> 5] |= 128 << 24 - i % 32,
                t[14 + (64 + i >>> 9 << 4)] = Math.floor(r / 4294967296),
                t[15 + (64 + i >>> 9 << 4)] = r,
                e.sigBytes = 4 * t.length,
                this._process(),
                this._hash
            },
            clone: function() {
                var e = n.clone.call(this);
                return e._hash = this._hash.clone(),
                e
            }
        }),
        r.SHA1 = n._createHelper(o),
        r.HmacSHA1 = n._createHmacHelper(o),
        e.SHA1)
    }),
    e(function(e, t) {
        var r, a;
        e.exports = (r = (e = m).lib.Base,
        a = e.enc.Utf8,
        void (e.algo.HMAC = r.extend({
            init: function(e, t) {
                e = this._hasher = new e.init,
                "string" == typeof t && (t = a.parse(t));
                for (var r = e.blockSize, i = 4 * r, e = ((t = t.sigBytes > i ? e.finalize(t) : t).clamp(),
                this._oKey = t.clone()), t = this._iKey = t.clone(), n = e.words, o = t.words, s = 0; s < r; s++)
                    n[s] ^= 1549556828,
                    o[s] ^= 909522486;
                e.sigBytes = t.sigBytes = i,
                this.reset()
            },
            reset: function() {
                var e = this._hasher;
                e.reset(),
                e.update(this._iKey)
            },
            update: function(e) {
                return this._hasher.update(e),
                this
            },
            finalize: function(e) {
                var t = this._hasher
                  , e = t.finalize(e);
                return t.reset(),
                t.finalize(this._oKey.clone().concat(e))
            }
        })))
    }),
    e(function(e, t) {
        var r, i, d, n, o, s;
        e.exports = (n = (r = e = m).lib,
        i = n.Base,
        d = n.WordArray,
        n = r.algo,
        o = n.MD5,
        s = n.EvpKDF = i.extend({
            cfg: i.extend({
                keySize: 4,
                hasher: o,
                iterations: 1
            }),
            init: function(e) {
                this.cfg = this.cfg.extend(e)
            },
            compute: function(e, t) {
                for (var r, i = this.cfg, n = i.hasher.create(), o = d.create(), s = o.words, a = i.keySize, g = i.iterations; s.length < a; ) {
                    r && n.update(r),
                    r = n.update(e).finalize(t),
                    n.reset();
                    for (var c = 1; c < g; c++)
                        r = n.finalize(r),
                        n.reset();
                    o.concat(r)
                }
                return o.sigBytes = 4 * a,
                o
            }
        }),
        r.EvpKDF = function(e, t, r) {
            return s.create(r).compute(e, t)
        }
        ,
        e.EvpKDF)
    }),
    e(function(e, t) {
        var r, i, s, n, o, a, g, c, d, u, l, p, f;
        e.exports = void ((e = m).lib.Cipher || (r = (e = e).lib,
        i = r.Base,
        s = r.WordArray,
        n = r.BufferedBlockAlgorithm,
        (u = e.enc).Utf8,
        o = u.Base64,
        a = e.algo.EvpKDF,
        g = r.Cipher = n.extend({
            cfg: i.extend(),
            createEncryptor: function(e, t) {
                return this.create(this._ENC_XFORM_MODE, e, t)
            },
            createDecryptor: function(e, t) {
                return this.create(this._DEC_XFORM_MODE, e, t)
            },
            init: function(e, t, r) {
                this.cfg = this.cfg.extend(r),
                this._xformMode = e,
                this._key = t,
                this.reset()
            },
            reset: function() {
                n.reset.call(this),
                this._doReset()
            },
            process: function(e) {
                return this._append(e),
                this._process()
            },
            finalize: function(e) {
                return e && this._append(e),
                this._doFinalize()
            },
            keySize: 4,
            ivSize: 4,
            _ENC_XFORM_MODE: 1,
            _DEC_XFORM_MODE: 2,
            _createHelper: function() {
                function n(e) {
                    return "string" == typeof e ? f : l
                }
                return function(i) {
                    return {
                        encrypt: function(e, t, r) {
                            return n(t).encrypt(i, e, t, r)
                        },
                        decrypt: function(e, t, r) {
                            return n(t).decrypt(i, e, t, r)
                        }
                    }
                }
            }()
        }),
        r.StreamCipher = g.extend({
            _doFinalize: function() {
                return this._process(!0)
            },
            blockSize: 1
        }),
        u = e.mode = {},
        c = r.BlockCipherMode = i.extend({
            createEncryptor: function(e, t) {
                return this.Encryptor.create(e, t)
            },
            createDecryptor: function(e, t) {
                return this.Decryptor.create(e, t)
            },
            init: function(e, t) {
                this._cipher = e,
                this._iv = t
            }
        }),
        u = u.CBC = function() {
            var e = c.extend();
            function o(e, t, r) {
                var i, n = this._iv;
                n ? (i = n,
                this._iv = void 0) : i = this._prevBlock;
                for (var o = 0; o < r; o++)
                    e[t + o] ^= i[o]
            }
            return e.Encryptor = e.extend({
                processBlock: function(e, t) {
                    var r = this._cipher
                      , i = r.blockSize;
                    o.call(this, e, t, i),
                    r.encryptBlock(e, t),
                    this._prevBlock = e.slice(t, t + i)
                }
            }),
            e.Decryptor = e.extend({
                processBlock: function(e, t) {
                    var r = this._cipher
                      , i = r.blockSize
                      , n = e.slice(t, t + i);
                    r.decryptBlock(e, t),
                    o.call(this, e, t, i),
                    this._prevBlock = n
                }
            }),
            e
        }(),
        p = (e.pad = {}).Pkcs7 = {
            pad: function(e, t) {
                for (var t = 4 * t, r = t - e.sigBytes % t, i = r << 24 | r << 16 | r << 8 | r, n = [], o = 0; o < r; o += 4)
                    n.push(i);
                t = s.create(n, r);
                e.concat(t)
            },
            unpad: function(e) {
                var t = 255 & e.words[e.sigBytes - 1 >>> 2];
                e.sigBytes -= t
            }
        },
        r.BlockCipher = g.extend({
            cfg: g.cfg.extend({
                mode: u,
                padding: p
            }),
            reset: function() {
                g.reset.call(this);
                var e, t = this.cfg, r = t.iv, t = t.mode;
                this._xformMode == this._ENC_XFORM_MODE ? e = t.createEncryptor : (e = t.createDecryptor,
                this._minBufferSize = 1),
                this._mode && this._mode.__creator == e ? this._mode.init(this, r && r.words) : (this._mode = e.call(t, this, r && r.words),
                this._mode.__creator = e)
            },
            _doProcessBlock: function(e, t) {
                this._mode.processBlock(e, t)
            },
            _doFinalize: function() {
                var e, t = this.cfg.padding;
                return this._xformMode == this._ENC_XFORM_MODE ? (t.pad(this._data, this.blockSize),
                e = this._process(!0)) : (e = this._process(!0),
                t.unpad(e)),
                e
            },
            blockSize: 4
        }),
        d = r.CipherParams = i.extend({
            init: function(e) {
                this.mixIn(e)
            },
            toString: function(e) {
                return (e || this.formatter).stringify(this)
            }
        }),
        u = (e.format = {}).OpenSSL = {
            stringify: function(e) {
                var t = e.ciphertext
                  , e = e.salt
                  , e = e ? s.create([1398893684, 1701076831]).concat(e).concat(t) : t;
                return e.toString(o)
            },
            parse: function(e) {
                var t, e = o.parse(e), r = e.words;
                return 1398893684 == r[0] && 1701076831 == r[1] && (t = s.create(r.slice(2, 4)),
                r.splice(0, 4),
                e.sigBytes -= 16),
                d.create({
                    ciphertext: e,
                    salt: t
                })
            }
        },
        l = r.SerializableCipher = i.extend({
            cfg: i.extend({
                format: u
            }),
            encrypt: function(e, t, r, i) {
                i = this.cfg.extend(i);
                var n = e.createEncryptor(r, i)
                  , t = n.finalize(t)
                  , n = n.cfg;
                return d.create({
                    ciphertext: t,
                    key: r,
                    iv: n.iv,
                    algorithm: e,
                    mode: n.mode,
                    padding: n.padding,
                    blockSize: e.blockSize,
                    formatter: i.format
                })
            },
            decrypt: function(e, t, r, i) {
                return i = this.cfg.extend(i),
                t = this._parse(t, i.format),
                e.createDecryptor(r, i).finalize(t.ciphertext)
            },
            _parse: function(e, t) {
                return "string" == typeof e ? t.parse(e, this) : e
            }
        }),
        p = (e.kdf = {}).OpenSSL = {
            execute: function(e, t, r, i) {
                i = i || s.random(8);
                e = a.create({
                    keySize: t + r
                }).compute(e, i),
                r = s.create(e.words.slice(t), 4 * r);
                return e.sigBytes = 4 * t,
                d.create({
                    key: e,
                    iv: r,
                    salt: i
                })
            }
        },
        f = r.PasswordBasedCipher = l.extend({
            cfg: l.cfg.extend({
                kdf: p
            }),
            encrypt: function(e, t, r, i) {
                r = (i = this.cfg.extend(i)).kdf.execute(r, e.keySize, e.ivSize),
                i.iv = r.iv,
                e = l.encrypt.call(this, e, t, r.key, i);
                return e.mixIn(r),
                e
            },
            decrypt: function(e, t, r, i) {
                i = this.cfg.extend(i),
                t = this._parse(t, i.format);
                r = i.kdf.execute(r, e.keySize, e.ivSize, t.salt);
                return i.iv = r.iv,
                l.decrypt.call(this, e, t, r.key, i)
            }
        })))
    }),
    e(function(e, t) {
        e.exports = function(e) {
            for (var t = e, r, i = t.lib.BlockCipher, n = t.algo, d = [], o = [], s = [], a = [], g = [], c = [], u = [], l = [], p = [], f = [], m = [], h = 0; h < 256; h++)
                if (h < 128)
                    m[h] = h << 1;
                else
                    m[h] = h << 1 ^ 283;
            for (var K = 0, y = 0, h = 0; h < 256; h++) {
                var U = y ^ y << 1 ^ y << 2 ^ y << 3 ^ y << 4;
                U = U >>> 8 ^ U & 255 ^ 99;
                d[K] = U;
                o[U] = K;
                var v = m[K];
                var k = m[v];
                var C = m[k];
                var _ = m[U] * 257 ^ U * 16843008;
                s[K] = _ << 24 | _ >>> 8;
                a[K] = _ << 16 | _ >>> 16;
                g[K] = _ << 8 | _ >>> 24;
                c[K] = _;
                var _ = C * 16843009 ^ k * 65537 ^ v * 257 ^ K * 16843008;
                u[U] = _ << 24 | _ >>> 8;
                l[U] = _ << 16 | _ >>> 16;
                p[U] = _ << 8 | _ >>> 24;
                f[U] = _;
                if (!K)
                    K = y = 1;
                else {
                    K = v ^ m[m[m[C ^ v]]];
                    y ^= m[m[y]]
                }
            }
            var w = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
              , b = n.AES = i.extend({
                _doReset: function() {
                    var e;
                    if (this._nRounds && this._keyPriorReset === this._key)
                        return;
                    var t = this._keyPriorReset = this._key;
                    var r = t.words;
                    var i = t.sigBytes / 4;
                    var n = this._nRounds = i + 6;
                    var o = (n + 1) * 4;
                    var s = this._keySchedule = [];
                    for (var a = 0; a < o; a++)
                        if (a < i)
                            s[a] = r[a];
                        else {
                            e = s[a - 1];
                            if (!(a % i)) {
                                e = e << 8 | e >>> 24;
                                e = d[e >>> 24] << 24 | d[e >>> 16 & 255] << 16 | d[e >>> 8 & 255] << 8 | d[e & 255];
                                e ^= w[a / i | 0] << 24
                            } else if (i > 6 && a % i == 4)
                                e = d[e >>> 24] << 24 | d[e >>> 16 & 255] << 16 | d[e >>> 8 & 255] << 8 | d[e & 255];
                            s[a] = s[a - i] ^ e
                        }
                    var g = this._invKeySchedule = [];
                    for (var c = 0; c < o; c++) {
                        var a = o - c;
                        if (c % 4)
                            var e = s[a];
                        else
                            var e = s[a - 4];
                        if (c < 4 || a <= 4)
                            g[c] = e;
                        else
                            g[c] = u[d[e >>> 24]] ^ l[d[e >>> 16 & 255]] ^ p[d[e >>> 8 & 255]] ^ f[d[e & 255]]
                    }
                },
                encryptBlock: function(e, t) {
                    this._doCryptBlock(e, t, this._keySchedule, s, a, g, c, d)
                },
                decryptBlock: function(e, t) {
                    var r = e[t + 1];
                    e[t + 1] = e[t + 3];
                    e[t + 3] = r;
                    this._doCryptBlock(e, t, this._invKeySchedule, u, l, p, f, o);
                    var r = e[t + 1];
                    e[t + 1] = e[t + 3];
                    e[t + 3] = r
                },
                _doCryptBlock: function(e, t, r, i, n, o, s, a) {
                    var g = this._nRounds;
                    var c = e[t] ^ r[0];
                    var d = e[t + 1] ^ r[1];
                    var u = e[t + 2] ^ r[2];
                    var l = e[t + 3] ^ r[3];
                    var p = 4;
                    for (var f = 1; f < g; f++) {
                        var m = i[c >>> 24] ^ n[d >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[l & 255] ^ r[p++];
                        var h = i[d >>> 24] ^ n[u >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[c & 255] ^ r[p++];
                        var K = i[u >>> 24] ^ n[l >>> 16 & 255] ^ o[c >>> 8 & 255] ^ s[d & 255] ^ r[p++];
                        var y = i[l >>> 24] ^ n[c >>> 16 & 255] ^ o[d >>> 8 & 255] ^ s[u & 255] ^ r[p++];
                        c = m;
                        d = h;
                        u = K;
                        l = y
                    }
                    var m = (a[c >>> 24] << 24 | a[d >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[l & 255]) ^ r[p++];
                    var h = (a[d >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[c & 255]) ^ r[p++];
                    var K = (a[u >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[c >>> 8 & 255] << 8 | a[d & 255]) ^ r[p++];
                    var y = (a[l >>> 24] << 24 | a[c >>> 16 & 255] << 16 | a[d >>> 8 & 255] << 8 | a[u & 255]) ^ r[p++];
                    e[t] = m;
                    e[t + 1] = h;
                    e[t + 2] = K;
                    e[t + 3] = y
                },
                keySize: 256 / 32
            });
            return t.AES = i._createHelper(b),
            e.AES
        }(m)
    }))
      , s = e(function(e, t) {
        e.exports = m.enc.Latin1
    })
      , a = e(function(e, t) {
        e.exports = m.enc.Utf8
    })
      , g = e(function(e, t) {
        e.exports = m.enc.Hex
    })
      , c = e(function(e, t) {
        e.exports = m.pad.Pkcs7
    })
      , d = e(function(e) {
        function u(e, t) {
            var r = (65535 & e) + (65535 & t);
            return (e >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r
        }
        function a(e, t, r, i, n, o) {
            return u((t = u(u(t, e), u(i, o))) << n | t >>> 32 - n, r)
        }
        function l(e, t, r, i, n, o, s) {
            return a(t & r | ~t & i, e, t, n, o, s)
        }
        function p(e, t, r, i, n, o, s) {
            return a(t & i | r & ~i, e, t, n, o, s)
        }
        function f(e, t, r, i, n, o, s) {
            return a(t ^ r ^ i, e, t, n, o, s)
        }
        function m(e, t, r, i, n, o, s) {
            return a(r ^ (t | ~i), e, t, n, o, s)
        }
        function s(e, t) {
            e[t >> 5] |= 128 << t % 32,
            e[14 + (t + 64 >>> 9 << 4)] = t;
            for (var r, i, n, o, s = 1732584193, a = -271733879, g = -1732584194, c = 271733878, d = 0; d < e.length; d += 16)
                s = l(r = s, i = a, n = g, o = c, e[d], 7, -680876936),
                c = l(c, s, a, g, e[d + 1], 12, -389564586),
                g = l(g, c, s, a, e[d + 2], 17, 606105819),
                a = l(a, g, c, s, e[d + 3], 22, -1044525330),
                s = l(s, a, g, c, e[d + 4], 7, -176418897),
                c = l(c, s, a, g, e[d + 5], 12, 1200080426),
                g = l(g, c, s, a, e[d + 6], 17, -1473231341),
                a = l(a, g, c, s, e[d + 7], 22, -45705983),
                s = l(s, a, g, c, e[d + 8], 7, 1770035416),
                c = l(c, s, a, g, e[d + 9], 12, -1958414417),
                g = l(g, c, s, a, e[d + 10], 17, -42063),
                a = l(a, g, c, s, e[d + 11], 22, -1990404162),
                s = l(s, a, g, c, e[d + 12], 7, 1804603682),
                c = l(c, s, a, g, e[d + 13], 12, -40341101),
                g = l(g, c, s, a, e[d + 14], 17, -1502002290),
                s = p(s, a = l(a, g, c, s, e[d + 15], 22, 1236535329), g, c, e[d + 1], 5, -165796510),
                c = p(c, s, a, g, e[d + 6], 9, -1069501632),
                g = p(g, c, s, a, e[d + 11], 14, 643717713),
                a = p(a, g, c, s, e[d], 20, -373897302),
                s = p(s, a, g, c, e[d + 5], 5, -701558691),
                c = p(c, s, a, g, e[d + 10], 9, 38016083),
                g = p(g, c, s, a, e[d + 15], 14, -660478335),
                a = p(a, g, c, s, e[d + 4], 20, -405537848),
                s = p(s, a, g, c, e[d + 9], 5, 568446438),
                c = p(c, s, a, g, e[d + 14], 9, -1019803690),
                g = p(g, c, s, a, e[d + 3], 14, -187363961),
                a = p(a, g, c, s, e[d + 8], 20, 1163531501),
                s = p(s, a, g, c, e[d + 13], 5, -1444681467),
                c = p(c, s, a, g, e[d + 2], 9, -51403784),
                g = p(g, c, s, a, e[d + 7], 14, 1735328473),
                s = f(s, a = p(a, g, c, s, e[d + 12], 20, -1926607734), g, c, e[d + 5], 4, -378558),
                c = f(c, s, a, g, e[d + 8], 11, -2022574463),
                g = f(g, c, s, a, e[d + 11], 16, 1839030562),
                a = f(a, g, c, s, e[d + 14], 23, -35309556),
                s = f(s, a, g, c, e[d + 1], 4, -1530992060),
                c = f(c, s, a, g, e[d + 4], 11, 1272893353),
                g = f(g, c, s, a, e[d + 7], 16, -155497632),
                a = f(a, g, c, s, e[d + 10], 23, -1094730640),
                s = f(s, a, g, c, e[d + 13], 4, 681279174),
                c = f(c, s, a, g, e[d], 11, -358537222),
                g = f(g, c, s, a, e[d + 3], 16, -722521979),
                a = f(a, g, c, s, e[d + 6], 23, 76029189),
                s = f(s, a, g, c, e[d + 9], 4, -640364487),
                c = f(c, s, a, g, e[d + 12], 11, -421815835),
                g = f(g, c, s, a, e[d + 15], 16, 530742520),
                s = m(s, a = f(a, g, c, s, e[d + 2], 23, -995338651), g, c, e[d], 6, -198630844),
                c = m(c, s, a, g, e[d + 7], 10, 1126891415),
                g = m(g, c, s, a, e[d + 14], 15, -1416354905),
                a = m(a, g, c, s, e[d + 5], 21, -57434055),
                s = m(s, a, g, c, e[d + 12], 6, 1700485571),
                c = m(c, s, a, g, e[d + 3], 10, -1894986606),
                g = m(g, c, s, a, e[d + 10], 15, -1051523),
                a = m(a, g, c, s, e[d + 1], 21, -2054922799),
                s = m(s, a, g, c, e[d + 8], 6, 1873313359),
                c = m(c, s, a, g, e[d + 15], 10, -30611744),
                g = m(g, c, s, a, e[d + 6], 15, -1560198380),
                a = m(a, g, c, s, e[d + 13], 21, 1309151649),
                s = m(s, a, g, c, e[d + 4], 6, -145523070),
                c = m(c, s, a, g, e[d + 11], 10, -1120210379),
                g = m(g, c, s, a, e[d + 2], 15, 718787259),
                a = m(a, g, c, s, e[d + 9], 21, -343485551),
                s = u(s, r),
                a = u(a, i),
                g = u(g, n),
                c = u(c, o);
            return [s, a, g, c]
        }
        function g(e) {
            for (var t = "", r = 32 * e.length, i = 0; i < r; i += 8)
                t += String.fromCharCode(e[i >> 5] >>> i % 32 & 255);
            return t
        }
        function c(e) {
            var t = [];
            for (t[(e.length >> 2) - 1] = void 0,
            i = 0; i < t.length; i += 1)
                t[i] = 0;
            for (var r = 8 * e.length, i = 0; i < r; i += 8)
                t[i >> 5] |= (255 & e.charCodeAt(i / 8)) << i % 32;
            return t
        }
        function i(e) {
            for (var t, r = "0123456789abcdef", i = "", n = 0; n < e.length; n += 1)
                t = e.charCodeAt(n),
                i += r.charAt(t >>> 4 & 15) + r.charAt(15 & t);
            return i
        }
        function d(e) {
            return unescape(encodeURIComponent(e))
        }
        function n(e) {
            return g(s(c(e = d(e)), 8 * e.length))
        }
        function o(e, t) {
            var r, e = d(e), t = d(t), i = c(e), n = [], o = [];
            for (n[15] = o[15] = void 0,
            16 < i.length && (i = s(i, 8 * e.length)),
            r = 0; r < 16; r += 1)
                n[r] = 909522486 ^ i[r],
                o[r] = 1549556828 ^ i[r];
            return e = s(n.concat(c(t)), 512 + 8 * t.length),
            g(s(o.concat(e), 640))
        }
        function t(e, t, r) {
            return t ? r ? o(t, e) : i(o(t, e)) : r ? n(e) : i(n(e))
        }
        var r;
        r = h,
        e.exports ? e.exports = t : r.md5 = t
    });
    return {
        encrypt: function(e, t, r, i) {
            return t = t || function(e) {
                for (var t = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], r = "", i = 0; i < e; i++)
                    r += t[Math.ceil(35 * Math.random())];
                return r
            }(16),
            r = r || d(t).substring(0, 32),
            i = i || r.substring(r.length - 16, r.length),
            {
                key: t,
                encryptedStr: o.encrypt(e, s.parse(r), {
                    iv: s.parse(i),
                    padding: c
                }).ciphertext.toString()
            }
        },
        decrypt: function(e, t, r, i) {
            if (!t)
                return console.error("请输入正确的解码 key，不能为空"),
                null;
            r = r || d(t).substring(0, 32),
            i = i || r.substring(r.length - 16, r.length);
            t = g.parse(e),
            e = n.stringify(t);
            return o.decrypt(e, s.parse(r), {
                iv: s.parse(i),
                padding: c
            }).toString(a)
        }
    }
}),
!function(e, t) {
    "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = e || self).RSA = t()
}(this, function() {
    "use strict";
    var r, h, U, v = 16, k = 65536, C = k >>> 1, _ = k * k, w = k - 1;
    function i(e) {
        r = new Array(e);
        for (var t = 0; t < r.length; t++)
            r[t] = 0;
        h = new b,
        (U = new b).digits[0] = 1
    }
    i(130);
    !function(e) {
        var t = new b
          , r = (t.isNeg = e < 0,
        e = Math.abs(e),
        0);
        for (; 0 < e; )
            t.digits[r++] = e & w,
            e >>= 16
    }(1e15);
    function b(e) {
        this.digits = "boolean" == typeof e && 1 == e ? null : r.slice(0),
        this.isNeg = !1
    }
    function I(e) {
        var t = new b(!0);
        return t.digits = e.digits.slice(0),
        t.isNeg = e.isNeg,
        t
    }
    function K(e) {
        for (var t = "", r = e.length - 1; -1 < r; --r)
            t += e.charAt(r);
        return t
    }
    var y = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
    var n = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
    function S(e) {
        for (var t = "", r = (M(e),
        M(e)); -1 < r; --r)
            t += function(e) {
                for (var t = "", r = 0; r < 4; ++r)
                    t += n[15 & e],
                    e >>>= 4;
                return K(t)
            }(e.digits[r]);
        return t
    }
    function o(e) {
        for (var t = new b, r = e.length, i = 0; 0 < r; r -= 4,
        ++i)
            t.digits[i] = function(e) {
                for (var t, r = 0, i = Math.min(e.length, 4), n = 0; n < i; ++n)
                    r = (r <<= 4) | (t = 48 <= (t = e.charCodeAt(n)) && t <= 57 ? t - 48 : 65 <= t && t <= 90 ? 10 + t - 65 : 97 <= t && t <= 122 ? 10 + t - 97 : 0);
                return r
            }(e.substr(Math.max(r - 4, 0), Math.min(r, 4)));
        return t
    }
    function T(e) {
        for (var t, r, i = "", n = M(e); -1 < n; --n)
            i += (t = e.digits[n],
            r = void 0,
            r = String.fromCharCode(255 & t),
            t >>>= 8,
            String.fromCharCode(255 & t) + r);
        return i
    }
    function A(e, t) {
        if (e.isNeg != t.isNeg)
            t.isNeg = !t.isNeg,
            i = E(e, t),
            t.isNeg = !t.isNeg;
        else {
            for (var r, i = new b, n = 0, o = 0; o < e.digits.length; ++o)
                r = e.digits[o] + t.digits[o] + n,
                i.digits[o] = 65535 & r,
                n = Number(k <= r);
            i.isNeg = e.isNeg
        }
        return i
    }
    function E(e, t) {
        if (e.isNeg != t.isNeg)
            t.isNeg = !t.isNeg,
            i = A(e, t),
            t.isNeg = !t.isNeg;
        else {
            for (var r, i = new b, n = o = 0; n < e.digits.length; ++n)
                r = e.digits[n] - t.digits[n] + o,
                i.digits[n] = 65535 & r,
                i.digits[n] < 0 && (i.digits[n] += k),
                o = 0 - Number(r < 0);
            if (-1 == o) {
                for (var o = 0, n = 0; n < e.digits.length; ++n)
                    r = 0 - i.digits[n] + o,
                    i.digits[n] = 65535 & r,
                    i.digits[n] < 0 && (i.digits[n] += k),
                    o = 0 - Number(r < 0);
                i.isNeg = !e.isNeg
            } else
                i.isNeg = e.isNeg
        }
        return i
    }
    function M(e) {
        for (var t = e.digits.length - 1; 0 < t && 0 == e.digits[t]; )
            --t;
        return t
    }
    function x(e) {
        for (var t = M(e), r = e.digits[t], i = (t + 1) * v, n = i; i - v < n && 0 == (32768 & r); --n)
            r <<= 1;
        return n
    }
    function s(e, t) {
        for (var r, i = new b, n = M(e), o = M(t), s = 0; s <= o; ++s) {
            for (var a = 0, g = s, c = 0; c <= n; ++c,
            ++g)
                r = i.digits[g] + e.digits[c] * t.digits[s] + a,
                i.digits[g] = r & w,
                a = r >>> 16;
            i.digits[s + n + 1] = a
        }
        return i.isNeg = e.isNeg != t.isNeg,
        i
    }
    function g(e, t, r, i, n) {
        for (var o = Math.min(t + n, e.length), s = t, a = i; s < o; ++s,
        ++a)
            r[a] = e[s]
    }
    var c = new Array(0,32768,49152,57344,61440,63488,64512,65024,65280,65408,65472,65504,65520,65528,65532,65534,65535);
    function B(e, t) {
        for (var r = Math.floor(t / v), i = new b, n = (g(e.digits, 0, i.digits, r, i.digits.length - r),
        t % v), o = v - n, s = i.digits.length - 1, a = s - 1; 0 < s; --s,
        --a)
            i.digits[s] = i.digits[s] << n & w | (i.digits[a] & c[n]) >>> o;
        return i.digits[0] = i.digits[s] << n & w,
        i.isNeg = e.isNeg,
        i
    }
    var d = new Array(0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535);
    function N(e, t) {
        for (var r = Math.floor(t / v), i = new b, n = (g(e.digits, r, i.digits, 0, e.digits.length - r),
        t % v), o = v - n, s = 0, a = s + 1; s < i.digits.length - 1; ++s,
        ++a)
            i.digits[s] = i.digits[s] >>> n | (i.digits[a] & d[n]) << o;
        return i.digits[i.digits.length - 1] >>>= n,
        i.isNeg = e.isNeg,
        i
    }
    function R(e, t) {
        var r = new b;
        return g(e.digits, 0, r.digits, t, r.digits.length - t),
        r
    }
    function a(e, t) {
        var r = new b;
        return g(e.digits, t, r.digits, 0, r.digits.length - t),
        r
    }
    function u(e, t) {
        var r = new b;
        return g(e.digits, 0, r.digits, 0, t),
        r
    }
    function D(e, t) {
        if (e.isNeg != t.isNeg)
            return 1 - 2 * Number(e.isNeg);
        for (var r = e.digits.length - 1; 0 <= r; --r)
            if (e.digits[r] != t.digits[r])
                return e.isNeg ? 1 - 2 * Number(e.digits[r] > t.digits[r]) : 1 - 2 * Number(e.digits[r] < t.digits[r]);
        return 0
    }
    function j(e, t) {
        var r = x(e)
          , i = x(t)
          , n = t.isNeg;
        if (r < i)
            return e.isNeg ? ((o = I(U)).isNeg = !t.isNeg,
            e.isNeg = !1,
            t.isNeg = !1,
            s = E(t, e),
            e.isNeg = !0,
            t.isNeg = n) : (o = new b,
            s = I(e)),
            new Array(o,s);
        for (var o = new b, s = e, a = Math.ceil(i / v) - 1, g = 0; t.digits[a] < C; )
            t = B(t, 1),
            ++g,
            ++i,
            a = Math.ceil(i / v) - 1;
        s = B(s, g),
        r += g;
        for (var c = Math.ceil(r / v) - 1, d = R(t, c - a); -1 != D(s, d); )
            ++o.digits[c - a],
            s = E(s, d);
        for (var u = c; a < u; --u) {
            for (var l = u >= s.digits.length ? 0 : s.digits[u], p = u - 1 >= s.digits.length ? 0 : s.digits[u - 1], f = u - 2 >= s.digits.length ? 0 : s.digits[u - 2], m = a >= t.digits.length ? 0 : t.digits[a], h = a - 1 >= t.digits.length ? 0 : t.digits[a - 1], K = (o.digits[u - a - 1] = l == m ? w : Math.floor((l * k + p) / m),
            o.digits[u - a - 1] * (m * k + h)), y = l * _ + (p * k + f); y < K; )
                --o.digits[u - a - 1],
                K = o.digits[u - a - 1] * (m * k | h),
                y = l * k * k + (p * k + f);
            (s = E(s, function(e, t) {
                for (var r, i = new b, n = M(e), o = 0, s = 0; s <= n; ++s)
                    r = i.digits[s] + e.digits[s] * t + o,
                    i.digits[s] = r & w,
                    o = r >>> 16;
                return i.digits[1 + n] = o,
                i
            }(d = R(t, u - a - 1), o.digits[u - a - 1]))).isNeg && (s = A(s, d),
            --o.digits[u - a - 1])
        }
        return s = N(s, g),
        o.isNeg = e.isNeg != n,
        e.isNeg && (o = (n ? A : E)(o, U),
        s = E(t = N(t, g), s)),
        0 == s.digits[0] && 0 == M(s) && (s.isNeg = !1),
        new Array(o,s)
    }
    function l(e) {
        this.modulus = I(e),
        this.k = M(this.modulus) + 1;
        var t, e = new b;
        e.digits[2 * this.k] = 1,
        this.mu = (t = this.modulus,
        j(e, t)[0]),
        this.bkplus1 = new b,
        this.bkplus1.digits[this.k + 1] = 1,
        this.modulo = p,
        this.multiplyMod = f,
        this.powMod = m
    }
    function p(e) {
        for (var t = a(e, this.k - 1), t = a(s(t, this.mu), this.k + 1), r = E(u(e, this.k + 1), u(s(t, this.modulus), this.k + 1)), i = 0 <= D(r = r.isNeg ? A(r, this.bkplus1) : r, this.modulus); i; )
            i = 0 <= D(r = E(r, this.modulus), this.modulus);
        return r
    }
    function f(e, t) {
        e = s(e, t);
        return this.modulo(e)
    }
    function m(e, t) {
        for (var r = new b, i = (r.digits[0] = 1,
        e), n = t; 0 != (1 & n.digits[0]) && (r = this.multiplyMod(r, i)),
        0 != (n = N(n, 1)).digits[0] || 0 != M(n); )
            i = this.multiplyMod(i, i);
        return r
    }
    var P = {};
    function G(e, t, r, i) {
        this.e = o(e),
        this.d = o(t),
        this.m = o(r),
        this.chunkSize = "number" != typeof i ? 2 * M(this.m) : i / 8,
        this.radix = 16,
        this.barrett = new l(this.m)
    }
    function O(e, t, r, i) {
        var n, o, s, a, g, c, d, u = new Array, l = t.length, p = "", f = "string" == typeof r ? r == P.NoPadding ? 1 : r == P.PKCS1Padding ? 2 : 0 : 0, m = "string" == typeof i && i == P.RawEncoding ? 1 : 0;
        for (1 == f ? l > e.chunkSize && (l = e.chunkSize) : 2 == f && l > e.chunkSize - 11 && (l = e.chunkSize - 11),
        n = 0,
        o = 2 == f ? l - 1 : e.chunkSize - 1; n < l; )
            f ? u[o] = t.charCodeAt(n) : u[n] = t.charCodeAt(n),
            n++,
            o--;
        for (1 == f && (n = 0),
        o = e.chunkSize - l % e.chunkSize; 0 < o; ) {
            if (2 == f) {
                for (a = Math.floor(256 * Math.random()); !a; )
                    a = Math.floor(256 * Math.random());
                u[n] = a
            } else
                u[n] = 0;
            n++,
            o--
        }
        for (2 == f && (u[l] = 0,
        u[e.chunkSize - 2] = 2,
        u[e.chunkSize - 1] = 0),
        g = u.length,
        n = 0; n < g; n += e.chunkSize) {
            for (c = new b,
            o = 0,
            s = n; s < n + e.chunkSize; ++o)
                c.digits[o] = u[s++],
                c.digits[o] += u[s++] << 8;
            d = e.barrett.powMod(c, e.e),
            p += 1 == m ? T(d) : 16 == e.radix ? S(d) : function(e, t) {
                for (var r = new b, i = (r.digits[0] = t,
                j(e, r)), n = y[i[1].digits[0]]; 1 == D(i[0], h); )
                    i = j(i[0], r),
                    digit = i[1].digits[0],
                    n += y[i[1].digits[0]];
                return (e.isNeg ? "-" : "") + K(n)
            }(d, e.radix)
        }
        return p
    }
    return P.NoPadding = "NoPadding",
    P.PKCS1Padding = "PKCS1Padding",
    P.RawEncoding = "RawEncoding",
    P.NumericEncoding = "NumericEncoding",
    {
        encrypt: function(e, t, r) {
            return i(130),
            r = r || "NoPadding",
            O(new G("10001","",t = t || "B1B1EC76A1BBDBF0D18E8CD9A87E53FA3881E2F004C67C9DDA2CA677DBEFA3D61DF8463FE12D84FF4B4699E02C9D41CAB917F5A8FB9E35580C4BDF97763A0420A476295D763EE10174E6F9EBF7DF8A77BA5B20CDA4EE705DEF5BBA3C88567B9656E52C9CD5CD95CA735FF2D25F762B133273EEEB7B4F3EA8B6DA29040F3B67CD",1024), e, r)
        }
    }
});
var jsVersion = 180925
  , KgUser = KgUser || {
    $: function() {
        for (var e = [], t = 0, r = arguments.length; t < r; t++) {
            var i = arguments[t];
            if ("string" == typeof i && (i = document.getElementById(i)),
            1 == r)
                return i;
            e.push(i)
        }
        return e
    },
    $T: function(e, t) {
        t = (this.$(t) || document).getElementsByTagName(e || "*");
        return this.$A(t)
    },
    $A: function(e) {
        for (var t = [], r = 0, i = e.length; r < i; r++)
            t.push(e[r]);
        return t
    },
    $C: function(e, t, r) {
        var i = []
          , n = 0;
        if (document.getElementsByClassName) {
            var o = this.$(t || document).getElementsByClassName(e);
            if (o = this.$A(o),
            r && "*" !== r)
                for (var s = o.length; n < s; n++)
                    o[n].tagName.toLowerCase() === r.toLowerCase() && i.push(o[n]);
            else
                i = o
        } else
            for (s = (o = this.$T(r, t)).length; n < s; n++)
                new RegExp("\\b" + e + "\\b","g").test(o[n].className) && i.push(o[n]);
        return i
    },
    addJsVersion: function(e) {
        return -1 == e.indexOf("?") ? e + "?kguser_jv=" + jsVersion : e + "&kguser_jv=" + jsVersion
    },
    isAckHost: function(e, t) {
        e = e.split("/");
        return e.length <= 2 || e[2] != t
    },
    loadScriptN: function(e, t, r, i) {
        var n = !1
          , o = null
          , s = 3e3
          , a = t || "";
        if (t && "object" == typeof t) {
            KgUser.IsEmpty(t.mid) && (t.mid = KgUser.Cookie.read(KgUser.KgMid.name));
            var g, c = "";
            for (g in t)
                "error" !== g && (c += g + "=" + t[g] + "&");
            a = c.substr(0, c.length - 1),
            KgUser.IsEmpty(t.timeout) || (s = t.timeout)
        }
        var d = document.createElement("script")
          , u = (d.type = "text/javascript",
        e = KgUser.addJsVersion(e = null != a && "" != a ? e + "?" + (a || "") : e),
        KgUser.KgErrType.busislave);
        -1 < e.indexOf("KgAck") && (u = KgUser.KgErrType.ackjs),
        d.src = e,
        d.onload = d.onreadystatechange = function() {
            this.readyState && "complete" != this.readyState && "loaded" != this.readyState || (d.onreadystatechange = d.onload = null,
            d = null,
            clearTimeout(o),
            r && r())
        }
        ,
        d.onerror = function() {
            n || (clearTimeout(o),
            t.error && t.error(u))
        }
        ,
        i && (d.async = "async"),
        o = setTimeout(function() {
            n = !0,
            t.error && t.error(u)
        }, s),
        document.getElementsByTagName("head")[0].appendChild(d)
    },
    loadScript: function(e, t, r) {
        var i = !1
          , n = null
          , o = t
          , s = e
          , a = t || "";
        if (t && "object" == typeof t) {
            KgUser.IsEmpty(t.mid) && (t.mid = KgUser.Cookie.read(KgUser.KgMid.name));
            var g, c = "";
            for (g in t)
                "error" !== g && (c += g + "=" + t[g] + "&");
            a = c.substr(0, c.length - 1),
            KgUser.IsEmpty(t.timeout) && (o.timeout = 3500)
        }
        var d, u, l, p, f = document.createElement("script"), a = (f.type = "text/javascript",
        e = KgUser.addJsVersion(e = null != a && "" != a ? e + "?" + (a || "") : e),
        KgUser.KgUrl.verify = "https://verifyservice.kugou.com/",
        e.split("/"));
        a.length <= 2 ? t.error && t.error(KgUser.KgErrType.param) : (d = a[2],
        l = KgUser.KgErrType.busislave,
        (u = "login-user.kugou.com" == d || "reg-user.kugou.com" == d) ? l = KgUser.KgErrType.busimaster : -1 < e.indexOf("KgAck") && (l = KgUser.KgErrType.ackjs),
        f.src = e,
        p = !1,
        f.onload = f.onreadystatechange = function() {
            this.readyState && "complete" != this.readyState && "loaded" != this.readyState || (f.onreadystatechange = f.onload = null,
            p = !(f = null),
            clearTimeout(n),
            r && r())
        }
        ,
        f.onerror = function() {
            u ? i || (clearTimeout(n),
            KgUser.loginDRRetry(s, d, o, r)) : t.error && t.error(l)
        }
        ,
        document.getElementsByTagName("head")[0].appendChild(f),
        u && (n = setTimeout(function() {
            p || (i = !0,
            KgUser.loginDRRetry(s, d, o, r))
        }, 3500)))
    },
    KgAckId: {
        login: 10015,
        reg: 10016,
        verify: 10017,
        url: "http://serveraddr.serviceweb.kugou.com/KgAck.js",
        url_https: "https://serveraddrweb.kugou.com/KgAckV2.js"
    },
    ackCallBack: function(e) {
        var t, r;
        1 == e.errorCode && (t = KgUser.KgAckId.global_param,
        e = e.data,
        r = t.loginHost,
        e = e["server_" + KgUser.KgAckId.login],
        KgUser.IsEmpty(e) || (e = e.list[0],
        KgUser.isAckHost(KgUser.KgUrl.login, r) || (KgUser.KgUrl.verify = "http://" + e,
        KgUser.KgUrl.login = KgUser.KgUrl.login.replace(r, e),
        KgUser.KgUrl.loginHTTP = KgUser.KgUrl.loginHTTP.replace(r, e)),
        KgUser.loadScriptN(t.url.replace(r, e), t.args, t.callback)))
    },
    ackCallBackUpdateCookie: function(e) {
        setTimeout(function() {
            var e = "ACK_SERVER_" + KgUser.KgAckId.login
              , t = KgUser.Cookie.read(e);
            KgUser.IsEmpty(t) || KgUser.Cookie.write(e, t, 3600, "/")
        }, 500)
    },
    KgErrType: {
        busimaster: 1,
        busislave: 2,
        ackjs: 3,
        ackconf: 4
    },
    loadAckJs: function(t) {
        for (var e = [KgUser.KgAckId.login, KgUser.KgAckId.reg, KgUser.KgAckId.verify], r = new Array, i = "ACK_SERVER_", n = 0; n < e.length; n++) {
            var o = KgUser.Cookie.read(i + e[n]);
            KgUser.IsEmpty(o) && r.push(e[n])
        }
        var s, a, g = 88;
        t && t.appid && 0 < parseInt(t.appid) && (g = t.appid),
        window.getAckConfCallback = function() {
            var e;
            "undefined" != typeof KgAck && ((e = new Object).appid = g,
            e.clientver = 10,
            e.clienttime = (new Date).getTime(),
            e.plats = r,
            void 0 !== t ? (KgAck.getConfig(e, "KgUser.ackCallBack"),
            t.error && setTimeout(function() {
                KgUser.IsEmpty(KgUser.Cookie.read(i + KgUser.KgAckId.login)) && t.error(KgUser.KgErrType.ackconf)
            }, timeout)) : KgAck.getConfig(e, "KgUser.ackCallBackUpdateCookie"))
        }
        ,
        0 < r.length && ("undefined" == typeof KgAck ? (s = KgUser.KgAckId.url,
        "https:" == document.location.protocol && (s = KgUser.KgAckId.url_https),
        (a = new Object).timeout = 3e3,
        t && t.timeout && (a.timeout = t.timeout),
        t && t.error && (a.error = t.error),
        KgUser.loadScriptN(s, a, getAckConfCallback, !0)) : getAckConfCallback())
    },
    ackRetry: function(e, t, r, i) {
        var n = "login-user.kugou.com"
          , o = KgUser.Cookie.read("ACK_SERVER_" + KgUser.KgAckId.login);
        if (!KgUser.IsEmpty(o))
            return o = KgUser.JSON.parse(o).list[0],
            KgUser.isAckHost(KgUser.KgUrl.login, n) || (KgUser.KgUrl.verify = "http://" + o,
            KgUser.KgUrl.login = KgUser.KgUrl.login.replace(n, o),
            KgUser.KgUrl.loginHTTP = KgUser.KgUrl.loginHTTP.replace(n, o)),
            void KgUser.loadScriptN(e.replace(t, o), r, i);
        t = new Object;
        t.loginHost = n,
        t.url = e,
        t.args = r,
        t.callback = i,
        KgUser.KgAckId.global_param = t,
        this.loadAckJs(r)
    },
    KgMid: {
        name: "kg_mid",
        days: 1e4
    },
    JSON: function() {
        function f(e) {
            return e < 10 ? "0" + e : e
        }
        Date.prototype.toJSON = function() {
            return this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z"
        }
        ;
        var m = {
            "\b": "\\b",
            "\t": "\\t",
            "\n": "\\n",
            "\f": "\\f",
            "\r": "\\r",
            '"': '\\"',
            "\\": "\\\\"
        };
        function stringify(e, t) {
            var r, i, n, o, s, a = /["\\\x00-\x1f\x7f-\x9f]/g;
            switch (typeof e) {
            case "string":
                return a.test(e) ? '"' + e.replace(a, function(e) {
                    var t = m[e];
                    return t || (t = e.charCodeAt(),
                    "\\u00" + Math.floor(t / 16).toString(16) + (t % 16).toString(16))
                }) + '"' : '"' + e + '"';
            case "number":
                return isFinite(e) ? String(e) : "null";
            case "boolean":
            case "null":
                return String(e);
            case "object":
                if (!e)
                    return "null";
                if ("function" == typeof e.toJSON)
                    return stringify(e.toJSON());
                if (r = [],
                "number" == typeof e.length && !e.propertyIsEnumerable("length")) {
                    for (o = e.length,
                    i = 0; i < o; i += 1)
                        r.push(stringify(e[i], t) || "null");
                    return "[" + r.join(",") + "]"
                }
                if (t)
                    for (o = t.length,
                    i = 0; i < o; i += 1)
                        "string" == typeof (n = t[i]) && (s = stringify(e[n], t)) && r.push(stringify(n) + ":" + s);
                else
                    for (n in e)
                        "string" == typeof n && (s = stringify(e[n], t)) && r.push(stringify(n) + ":" + s);
                return "{" + r.join(",") + "}"
            }
        }
        return {
            stringify: stringify,
            parse: function(text, filter) {
                var j;
                function walk(e, t) {
                    var r, i;
                    if (t && "object" == typeof t)
                        for (r in t)
                            Object.prototype.hasOwnProperty.apply(t, [r]) && (void 0 !== (i = walk(r, t[r])) ? t[r] = i : delete t[r]);
                    return filter(e, t)
                }
                if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, "")))
                    return j = eval("(" + text + ")"),
                    "function" == typeof filter ? walk("", j) : j;
                throw new SyntaxError("parseJSON")
            }
        }
    }(),
    Cookie: {
        write: function(e, t, r, i, n, o, s) {
            var a, g = "";
            r && ((a = new Date).setTime(a.getTime() + 1e3 * r),
            g = ";expires=" + a.toGMTString()),
            t = encodeURIComponent(t),
            i = i ? "; path=" + i : ";path=/",
            n = n ? "; domain=" + n : "",
            o = o ? "; secure" : "",
            s = s ? "; sameSite=" + s : "",
            document.cookie = [e, "=", t, g, i, n, o, s].join("")
        },
        writeUnencodeVaule: function(e, t, r, i, n, o, s) {
            var a, g = "";
            r && ((a = new Date).setTime(a.getTime() + 1e3 * r),
            g = ";expires=" + a.toGMTString()),
            t = t || "",
            i = i ? "; path=" + i : ";path=/",
            n = n ? "; domain=" + n : "",
            o = o ? "; secure" : "",
            s = s ? "; sameSite=" + s : "",
            document.cookie = [e, "=", t, g, i, n, o, s].join("")
        },
        setDay: function(e, t, r, i, n, o) {
            this.write(e, t, 24 * r * 60 * 60, i, n, o)
        },
        setHour: function(e, t, r, i, n, o) {
            this.write(e, t, 60 * r * 60, i, n, o)
        },
        setMin: function(e, t, r, i, n, o) {
            this.write(e, t, 60 * r, i, n, o)
        },
        setSec: function(e, t, r, i, n, o) {
            this.write(e, t, r, i, n, o)
        },
        read: function(e, t) {
            var r = ""
              , e = e + "=";
            if (0 < document.cookie.length && -1 != (offset = document.cookie.indexOf(e)) && (offset += e.length,
            -1 == (end = document.cookie.indexOf(";", offset)) && (end = document.cookie.length),
            r = document.cookie.substring(offset, end),
            void 0 !== t && null != t && "" != t))
                for (var i = r.toString().split("&"), n = 0; n < i.length; n++) {
                    var o = i[n];
                    if (o.substring(0, t.length + 1) == t + "=") {
                        r = o.substring(t.length + 1).replace(/%/g, "\\");
                        break
                    }
                    r = ""
                }
            return decodeURIComponent(r)
        },
        remove: function(e) {
            this.write(e, "", -90)
        }
    },
    KgUrl: {
        login: "https://login-user.kugou.com/",
        loginHTTP: "http://login-user.kugou.com/",
        verify: "https://verifyservice.kugou.com/",
        third: "https://openplat-user.kugou.com/",
        cross: "https://loginservice.kugou.com/",
        reg: "https://reg-user.kugou.com/",
        user: "https://userinfoservice.kugou.com/",
        qrcodeH5: "https://h5.kugou.com/apps/loginQRCode/html/index.html"
    },
    LoadCss: function(e, t) {
        var r = document.createElement("style")
          , i = document.head || document.getElementsByTagName("head")[0];
        r.type = "text/css",
        r.id = t,
        r.styleSheet ? (t = function() {
            try {
                r.styleSheet.cssText = e
            } catch (e) {}
        }
        ,
        r.styleSheet.disabled ? setTimeout(t, 10) : t()) : (t = document.createTextNode(e),
        r.appendChild(t)),
        i.appendChild(r)
    },
    Login: function(r, o) {
        var s, i, a, g = "", c = "", d = 1, u = !1, l = "", p = "", f = 1e3;
        if (KgUser.IsEmpty(r.appid) || KgUser.IsEmpty(KgUser.Trim(r.username)) || KgUser.IsEmpty(KgUser.Trim(r.pwd)) || KgUser.IsEmpty(o))
            return KgUser.GetMsg(o, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        s = r.appid,
        i = KgUser.Trim(r.username),
        a = KgUser.Trim(r.pwd),
        KgUser.IsEmpty(KgUser.Trim(r.code)) || (g = KgUser.Trim(r.code)),
        KgUser.IsEmpty(KgUser.Trim(r.ticket)) || (c = KgUser.Trim(r.ticket)),
        KgUser.IsEmpty(r.expire_day) || (d = r.expire_day),
        KgUser.IsEmpty(r.autologin) || (u = r.autologin),
        KgUser.IsEmpty(r.redirect_uri) || r.redirect_uri,
        KgUser.IsEmpty(r.state) || r.state,
        KgUser.IsEmpty(KgUser.Trim(r.mobile)) || (l = KgUser.Trim(r.mobile)),
        KgUser.IsEmpty(KgUser.Trim(r.mobile_code)) || (p = KgUser.Trim(r.mobile_code)),
        KgUser.IsEmpty(KgUser.Trim(r.clientver)) || (f = KgUser.Trim(r.clientver)),
        u && (d = 30);
        var m, h = parseInt((new Date).getTime());
        KgUser.getDfidAsyn(s, function(e) {
            m = e;
            var e = !1
              , n = {
                appid: s,
                clientver: f,
                clienttime: h,
                mid: KgUser.getKgMid(),
                uuid: KgUser.getKgMid(),
                dfid: m,
                dev: "web",
                plat: KgUser.getPlat(s),
                clienttime_ms: h,
                support_third: 0,
                support_multi: r.support_multi || 0,
                support_face_verify: 0,
                support_verify: 1,
                from_sdk: 1,
                expire_day: d,
                autologin: u
            }
              , t = (c && (n.verifykey = "ThirdCode"),
            g && (n.verifykey = r.verifykey || ""),
            !isNaN(i) && 1e10 < Number(i) && Number(i) < 2e10 && (e = !0),
            n.username = e ? Number(i).toString().substring(0, 2) + "********" + Number(i).toString().substring(10, 11) : i,
            {
                pwd: a
            })
              , e = (e && (t.username = i),
            n.verifykey && (c || g) && (t.verifycode = c || g),
            l && (t.mobile = l),
            p && (t.code = p),
            AES.encrypt(JSON.stringify(t)))
              , t = RSA.encrypt(JSON.stringify({
                clienttime_ms: h,
                key: e.key
            }));
            n.pk = t,
            n.params = e.encryptedStr,
            getInterFaceKguser(n, null, function(e) {
                e = KgUser.objectToGetParams(e);
                KgUser.sentPostRequest(KgUser.KgUrl.cross + "v1/login_by_pwd_get?" + e, null, function(t, e) {
                    try {
                        t = JSON.parse(t)
                    } catch (e) {}
                    var r = {
                        status: t && t.status,
                        errorCode: "",
                        errorMsg: ""
                    };
                    if (t && 0 == t.status && (r.errorCode = t.error_code,
                    r.errorMsg = t.data),
                    t && 1 == t.status && t.data && (r.nickname = t.data.nickname,
                    r.pic = t.data.pic,
                    r.userid = t.data.userid,
                    r.username = t.data.username),
                    !t || 0 != t.status || !e.getResponseHeader("SSA-CODE"))
                        return KgUser.GetMsg(o, r),
                        !1;
                    var i = e.getResponseHeader("SSA-CODE")
                      , e = e.getResponseHeader("SSA-HMID");
                    i ? "PC" == KgUser.getClientType() ? KgUser.antiBrush({
                        eventid: i,
                        userid: 0,
                        appid: s,
                        mid: e || n.mid,
                        url: window.location.href,
                        allowMultipleInit: !0,
                        callback: function(e) {
                            1 == e.status ? KgUser.QRCodeLogin(s, userId, token, o) : KgUser.GetMsg(o, {
                                status: 0,
                                error_code: t && t.error_code,
                                data: "请先进行验证"
                            })
                        }
                    }) : KgUser.antiBrushH5({
                        eventid: i,
                        userid: 0,
                        appid: s,
                        mid: e || n.mid,
                        url: window.location.href,
                        openWith: "iframe",
                        callback: function(e) {
                            1 == e.status ? KgUser.GetSmsCode(s, userId, token, o) : KgUser.GetMsg(o, {
                                status: 0,
                                error_code: t && t.error_code,
                                data: "请先进行验证"
                            })
                        }
                    }) : KgUser.GetMsg(o, r)
                }, null, {
                    withCredentials: !0
                })
            })
        })
    },
    LoginByVerifycode: function(e, r) {
        var i, n, o = "", s = 1, a = 1;
        if (KgUser.IsEmpty(e.appid) || KgUser.IsEmpty(KgUser.Trim(e.mobile)) || KgUser.IsEmpty(KgUser.Trim(e.code)) || KgUser.IsEmpty(r))
            return KgUser.GetMsg(r, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        i = e.appid,
        n = KgUser.Trim(e.mobile),
        KgUser.IsEmpty(KgUser.Trim(e.code)) || (o = KgUser.Trim(e.code)),
        KgUser.IsEmpty(e.expire_day) || (s = e.expire_day),
        KgUser.IsEmpty(e.force_login) && 0 != e.force_login || (a = e.force_login);
        var g, c = KgUser.getPlat(i);
        KgUser.getDfidAsyn(i, function(e) {
            g = e;
            var e = {
                appid: i,
                mobile: encodeURIComponent(n),
                code: o,
                clienttime: parseInt((new Date).getTime() / 1e3),
                expire_day: s,
                callback: "KgUser.LoginByCodeVerifyCallback",
                login_ver: 1,
                plat: c,
                dfid: g,
                force_login: a
            }
              , t = KgUser.getKgMid();
            KgUser.LoginByCodeVerifyCallbackParam.appid = i,
            KgUser.LoginByCodeVerifyCallbackParam.mid = t,
            KgUser.LoginByCodeVerifyCallbackParam.callbackName = r,
            KgUser.loadScript(KgUser.KgUrl.login + "v1/loginbyverifycode/", e)
        })
    },
    LoginByVerifycodeV2: function(e, n) {
        var o, s, a = "", g = 1, c = 1, d = KgUser.getKgMid(), u = "", l = 1, p = "";
        if (KgUser.IsEmpty(e.appid) || KgUser.IsEmpty(KgUser.Trim(e.mobile)) || KgUser.IsEmpty(KgUser.Trim(e.code)) || KgUser.IsEmpty(n))
            return KgUser.GetMsg(n, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        o = e.appid,
        s = KgUser.Trim(e.mobile),
        KgUser.IsEmpty(KgUser.Trim(e.code)) || (a = KgUser.Trim(e.code)),
        KgUser.IsEmpty(e.expire_day) || (g = e.expire_day),
        KgUser.IsEmpty(e.support_multi) || (c = e.support_multi),
        KgUser.IsEmpty(e.userid) || (u = e.userid),
        KgUser.IsEmpty(e.force_login) && 0 != e.force_login || (l = e.force_login),
        KgUser.IsEmpty(e.verify_data) && 0 != e.verify_data || (p = e.verify_data);
        var f, m = KgUser.getPlat(o);
        KgUser.getDfidAsyn(o, function(e) {
            f = e;
            var t = {
                appid: o,
                clientver: 10,
                clienttime: parseInt((new Date).getTime() / 1e3),
                mid: d,
                dfid: f
            }
              , r = {
                plat: m,
                mobile: encodeURIComponent(s),
                code: a,
                expire_day: g,
                support_multi: c,
                userid: u,
                force_login: l
            }
              , i = p ? [{
                key: "VerifyData",
                value: p
            }] : null;
            getInterFaceKguser(t, r, function(e) {
                e = KgUser.objectToGetParams(e);
                KgUser.sentPostRequest(KgUser.KgUrl.login + "v2/loginbyverifycode/?" + e, r, function(e) {
                    KgUser.LoginByCodeVerifyCallback(e, o, d, n, g, t, r)
                }, i)
            })
        })
    },
    checkMobileV3: function(r, i) {
        var n = r.appid;
        KgUser.getDfidAsyn(n, function(e) {
            dfid = e;
            var e = {
                appid: n,
                clientver: 1e3,
                clienttime: parseInt((new Date).getTime() / 1e3),
                mid: KgUser.getKgMid(),
                uuid: KgUser.getKgMid(),
                dfid: dfid
            }
              , t = {
                plat: KgUser.getPlat(n),
                mobile: r.mobile,
                code: r.code,
                businessid: r.businessid || 1,
                query: r.query
            };
            getInterFaceKguser(e, t, function(e) {
                e = KgUser.objectToGetParams(e);
                KgUser.sentPostRequest(KgUser.KgUrl.user + "v3/check_mobile?" + e, t, function(e) {
                    i && i(e)
                })
            })
        })
    },
    LoginByCodeVerifyCallbackParam: {
        appid: "",
        mid: "",
        callbackName: ""
    },
    LoginByCodeVerifyCallback: function(e, t, r, i, n, o, s) {
        if ("string" == typeof e && (e = JSON.parse(e)),
        null == t && null == r && null == i && (t = KgUser.LoginByCodeVerifyCallbackParam.appid,
        r = KgUser.LoginByCodeVerifyCallbackParam.mid,
        i = KgUser.LoginByCodeVerifyCallbackParam.callbackName),
        20028 == e.errorCode) {
            var a = e.eventid;
            1058 == t ? KgUser.antiBrushH5({
                eventid: a,
                userid: 0,
                appid: t,
                mid: r,
                url: window.location.href,
                callback: function(e) {
                    KgUser.GetMsg(i, e)
                }
            }) : KgUser.antiBrush({
                eventid: a,
                userid: 0,
                appid: t,
                mid: r,
                url: window.location.href,
                callback: function(e) {
                    KgUser.GetMsg(i, e)
                }
            })
        } else if (20028 == e.error_code) {
            a = function(e, t) {
                for (var r = {}, i = e.split("&"), n = 0; n < i.length; n++)
                    r[i[n].split("=")[0]] = unescape(i[n].split("=")[1]);
                return r[t]
            }(e.data, "eventid"),
            o = {
                appid: o.appid,
                mobile: decodeURIComponent(s.mobile),
                code: s.code,
                support_multi: s.support_multi,
                userid: s.userid,
                force_login: s.force_login,
                verify_data: "",
                api: "LoginByVerifycodeV2"
            };
            KgUser.Cookie.write("kg_login_retry", "", -90, "/", "kugou.com"),
            KgUser.Cookie.write("kg_login_retry", JSON.stringify(o), 3e5, "/", KgUser.GetDomain()),
            KgUser.antiBrushH5({
                eventid: a,
                userid: 0,
                appid: t,
                mid: r,
                url: window.location.href + "&vb=1"
            })
        } else {
            if (1 == e.status && 0 == e.error_code)
                try {
                    var g = e.data.domain
                      , c = e.data.name
                      , d = e.data.path
                      , u = e.data.value;
                    KgUser.Cookie.writeUnencodeVaule(c, u, 86400 * n, d, g)
                } catch (e) {}
            KgUser.GetMsg(i, e)
        }
    },
    objectToGetParams: function(e) {
        var t, r = "";
        for (t in e)
            e.hasOwnProperty(t) && (r = "" == r ? r + t + "=" + e[t] : r + "&" + t + "=" + e[t]);
        return r
    },
    VerifyCode: function(e, t) {
        var r, n, o = 90, s = 40, a = "LoginCheckCode", g = "", c = 0;
        if (KgUser.IsEmpty(e.appid))
            return !1;
        r = e.appid,
        n = KgUser.Trim(e.codeid),
        KgUser.IsEmpty(KgUser.Trim(e.width)) || (o = KgUser.Trim(e.width)),
        KgUser.IsEmpty(KgUser.Trim(e.height)) || (s = KgUser.Trim(e.height)),
        KgUser.IsEmpty(KgUser.Trim(e.type)) || (a = KgUser.Trim(e.type)),
        KgUser.IsEmpty(KgUser.Trim(e.inputid)) || (g = KgUser.Trim(e.inputid));
        var c = KgUser.IsEmpty(e.codetype) ? 0 : e.codetype
          , d = Math.round(100 * Math.random());
        if ("RegCheckCode" == a && void 0 === e.codetype) {
            0 <= d && d <= 100 ? c = 1 : 31 <= d && d <= 40 && (c = 2);
            var u = g.split(",");
            for (i = 0; i < u.length; i++)
                void 0 !== KgUser.$(u[i]) && (KgUser.$(u[i]).style.display = 0 != c ? "none" : "")
        }
        KgUser.CodeAll.codetype = c,
        KgUser.CodeAll.appid = r,
        KgUser.CodeAll.codeid = n;
        var l = "";
        switch (l = (l = 3 == c && "LoginCheckCode" == a || "LoginCheckCode" == a || "RegCheckCode" == a || "SmsCheckCode" == a ? KgUser.KgUrl.login : KgUser.KgUrl.verify) + "v1/get_img_code?type=" + a + "&appid=" + r + "&codetype=" + c + "&t=" + (new Date).getTime(),
        c) {
        case 1:
            setTimeout(function() {
                KgUser.SudokuCode({
                    url: l,
                    id: e.codeid,
                    appid: r
                }, t)
            }, 100);
            break;
        case 2:
            setTimeout(function() {
                KgUser.ThirdCode({
                    id: e.codeid,
                    url: l
                }, t)
            }, 100);
            break;
        case 3:
            KgUser.SliderVerifyCode({
                url: l,
                appid: r,
                success: e.success,
                close: e.close,
                update: e.update,
                timeout: e.timeout,
                callback: e.callback,
                callback_deg: e.callback_deg
            });
            break;
        default:
            setTimeout(function() {
                KgUser.$(n).style.display = "",
                KgUser.$(n).innerHTML = '<img id="KgPopupVerifyCode" src="' + l + '" onclick="KgUser.ChangeVerifyCode(this,' + r + ",'" + a + '\')" title="看不清，换一张" alt="看不清，换一张" style="cursor:pointer;width:' + o + "px;height:" + s + 'px;" />'
            }, 100)
        }
    },
    ChangeVerifyCode: function(t, r, i) {
        setTimeout(function() {
            var e = ""
              , e = "LoginCheckCode" == i || "RegCheckCode" == i || "SmsCheckCode" == i ? KgUser.KgUrl.login : KgUser.KgUrl.verify;
            t.src = e + "v1/get_img_code?type=" + i + "&appid=" + r + "&t=" + (new Date).getTime()
        }, 100)
    },
    CheckVerifyCode: function(e) {
        var t = parseInt((new Date).getTime() / 1e3);
        if (KgUser.IsEmpty(e.appid) || KgUser.IsEmpty(KgUser.Trim(e.username)))
            return !1;
        var r = e.appid
          , e = KgUser.Trim(e.username)
          , r = {
            appid: r,
            username: encodeURIComponent(e),
            t: t
        };
        KgUser.loadScript(KgUser.KgUrl.login + "v1/check/", r)
    },
    ThirdLogin: function(e, t) {
        var r = ""
          , i = ""
          , n = 0
          , o = 0
          , s = ""
          , a = 0
          , g = parseInt((new Date).getTime() / 1e3)
          , c = ""
          , d = 0
          , u = ("https:" === document.location.protocol && (d = 1),
        KgUser.IsEmpty(e.https) || (d = e.https),
        KgUser.IsEmpty(e.appid) || (a = e.appid),
        KgUser.IsEmpty(KgUser.Trim(e.partner)) || (s = KgUser.Trim(e.partner).toLowerCase()),
        KgUser.IsEmpty(KgUser.Trim(e.client)) || (c = KgUser.Trim(e.client).toLowerCase()),
        "");
        switch (s) {
        case "qzone":
        case "qq":
            r = KgUser.KgUrl.third + "qq/?",
            i = "TencentLogin",
            n = 470,
            o = 340,
            u = "qq";
            break;
        case "sina":
            r = KgUser.KgUrl.third + "sina/?",
            i = "SinaLogin",
            n = 562,
            o = 380;
            break;
        case "qqweibo":
            r = KgUser.KgUrl.third + "qqweibo/?",
            i = "QQWeiBoLogin",
            n = 563,
            o = 387;
            break;
        case "renren":
            r = KgUser.KgUrl.third + "renren/?",
            i = "RenrenLogin",
            n = 563,
            o = 387;
            break;
        case "weixin":
            r = KgUser.KgUrl.third + "weixin/index.php?ktype=0",
            i = "WeiXinLogin",
            n = 563,
            o = 593,
            u = "wechat";
            break;
        case "esurfing":
            r = KgUser.KgUrl.third + "esurfing/?",
            i = "EsurLogin",
            n = 800,
            o = 458
        }
        var l, p = 0, f = (KgUser.IsEmpty(KgUser.Trim(e.bind)) || (p = KgUser.Trim(e.bind)),
        "");
        KgUser.IsEmpty(KgUser.Trim(e.ktype)) || (f = "&ktype=" + e.ktype),
        (r = 1 == p && "" != u ? "https://openplat-user.kugou.com/bind?userid=0&bind=1&partnername=" + u + f : r) && (r += "&appid=" + a + "&clienttime=" + g + "&callback=" + t + "&domain=" + KgUser.GetDomain() + "&https=" + d,
        e = KgUser.Cookie.read(KgUser.KgMid.name),
        KgUser.IsEmpty(e) || (r += "&mid=" + e),
        l = KgUser.getPlat(a),
        KgUser.getDfidAsyn(a, function(e) {
            r += "&dfid=" + e + "&platid=" + l;
            var e = (window.screen.width - n) / 2
              , t = (window.screen.height - o) / 2;
            if ("mackugou" == c || "uwp" == c) {
                switch (r += "&client=" + c,
                s) {
                case "qzone":
                    n = 540,
                    o = 400;
                    break;
                case "sina":
                    n = 768,
                    o = 400
                }
                Supercall && Supercall.setView({
                    type: "child",
                    window: "contentWindow",
                    name: "ThirdLogin",
                    options: {
                        width: n,
                        height: o,
                        url: r,
                        parent: "login",
                        standButton: ["close"]
                    }
                }, function() {})
            } else
                window.open(r, i, "width=" + n + ",height=" + o + ",left=" + e + ",top=" + t + ",menubar=0,scrollbars=0,resizable=0,status=0,titlebar=0,toolbar=0,location=1")
        }))
    },
    SliderVerifyCode: function(t) {
        var r = this
          , i = t.success
          , n = t.close
          , o = t.update
          , s = t.callback
          , a = t.callback_deg
          , g = t.timeout
          , e = t.url
          , c = !1;
        function d() {
            window.capDestroy();
            var e = {
                showHeader: !0,
                type: "popup",
                start: function() {},
                callback: function(e) {
                    e = e,
                    (c = !0) && (e.ticket && 0 == e.ret ? (e = e.ticket,
                    i && i(e)) : n && n())
                }
            };
            window.capRefresh(),
            o && o(),
            s && s(!0),
            window.capInit(document, e)
        }
        r.tcaptchaJsUrl ? d() : r.loadingTcaptchaJsUrl || (r.loadingTcaptchaJsUrl = !0,
        window.kgSliderVerifyCodeHandler = function(e) {
            r.loadingTcaptchaJsUrl = !1,
            e && 0 == e.success && 1 == e.isDegrade ? a && a() : e && e.success && e.url ? (KgUser.loadScript(e.url, "", function() {
                c = !0,
                r.tcaptchaJsUrl = e.url,
                r.loadingTcaptchaJsUrl = !1,
                1 <= window.navigator.userAgent.indexOf("MSIE") ? setTimeout(function() {
                    d()
                }, 500) : d()
            }),
            g && 0 < g && setTimeout(function() {
                c || s && s(!1)
            }, g)) : (r.loadingTcaptchaJsUrl = !1,
            void 0 === t.retry && (t.retry = 3),
            0 < t.retry && (t.retry--,
            r.SliderVerifyCode(t)))
        }
        ,
        this.loadScript(e + "&callback=kgSliderVerifyCodeHandler"))
    },
    CrossDomainLogin: function(callbackName) {
        var appid = 0
          , userid = 0
          , token = ""
          , ct = parseInt((new Date).getTime() / 1e3)
          , domain = KgUser.GetDomain()
          , param = (KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "a_id")) || (appid = parseInt(KgUser.Cookie.read("KuGoo", "a_id"))),
        KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "KugooID")) || (userid = parseInt(KgUser.Cookie.read("KuGoo", "KugooID"))),
        KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "ct")) || (ct = parseInt(KgUser.Cookie.read("KuGoo", "ct"))),
        KgUser.IsEmpty(KgUser.Trim(KgUser.Cookie.read("KuGoo", "t"))) || (token = KgUser.Trim(KgUser.Cookie.read("KuGoo", "t"))),
        {
            a_id: appid,
            userid: userid,
            t: token,
            ct: ct,
            callback: "",
            domain: domain,
            midname: KgUser.KgMid.name,
            days: KgUser.KgMid.days
        })
          , url = KgUser.KgUrl.login;
        KgUser.loadScript(url + "v1/cross/", param, function() {
            var uinfo;
            KgUser.IsEmpty(callbackName) || (uinfo = new Object,
            KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "KugooID")) || (uinfo.userid = parseInt(KgUser.Cookie.read("KuGoo", "KugooID"))),
            KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "UserName")) || (uinfo.username = eval("'" + KgUser.Trim(KgUser.Cookie.read("KuGoo", "UserName")) + "'")),
            KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "NickName")) || (uinfo.nickname = eval("'" + KgUser.Trim(KgUser.Cookie.read("KuGoo", "NickName")) + "'")),
            KgUser.IsEmpty(KgUser.Trim(KgUser.Cookie.read("KuGoo", "t"))) || (uinfo.token = KgUser.Trim(KgUser.Cookie.read("KuGoo", "t"))),
            KgUser.IsEmpty(KgUser.Trim(KgUser.Cookie.read("KuGoo", "Pic"))) || (uinfo.pic = KgUser.Trim(KgUser.Cookie.read("KuGoo", "Pic"))),
            KgUser.GetMsg(callbackName, uinfo))
        })
    },
    AutoLogin: function(e) {
        var r = 0
          , i = 0
          , n = ""
          , o = parseInt((new Date).getTime() / 1e3)
          , s = KgUser.GetDomain()
          , a = (KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "a_id")) || (r = parseInt(KgUser.Cookie.read("KuGoo", "a_id"))),
        KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "KugooID")) || (i = parseInt(KgUser.Cookie.read("KuGoo", "KugooID"))),
        KgUser.IsEmpty(KgUser.Cookie.read("KuGoo", "ct")) || (o = parseInt(KgUser.Cookie.read("KuGoo", "ct"))),
        KgUser.IsEmpty(KgUser.Trim(KgUser.Cookie.read("KuGoo", "t"))) || (n = KgUser.Trim(KgUser.Cookie.read("KuGoo", "t"))),
        KgUser.getPlat(r));
        KgUser.getDfidAsyn(r, function(e) {
            var e = {
                a_id: r,
                userid: i,
                t: n,
                ct: o,
                callback: "",
                domain: s,
                plat: a,
                dfid: e
            }
              , t = KgUser.KgUrl.login;
            KgUser.IsEmpty(n) || KgUser.loadScript(t + "v1/autologin", e)
        })
    },
    LoginOut: function(e) {
        KgUser.Cookie.setDay("KuGoo", "", -1, "", "." + KgUser.GetDomain(), "");
        var t, e = KgUser.KgUrl.cross + "v2/loginout/?a_id=" + e + "&ct=" + parseInt((new Date).getTime() / 1e3) + "&domain=" + KgUser.GetDomain();
        /MSIE (\d+\.\d+);/.test(navigator.userAgent) || /MSIE(\d+\.\d+);/.test(navigator.userAgent) ? ((t = document.createElement("a")).href = e,
        document.body.appendChild(t),
        t.click()) : location.href = e
    },
    GetDomain: function() {
        return "" == document.domain.toString() ? "" : document.domain.toString().match(/\w*\.(com.cn|com|net.cn|net|org.cn|org|gov.cn|gov|cn|mobi|me|info|name|biz|cc|tv|asia|hk|网络|公司|中国).*$/g)[0]
    },
    GetMsg: function(e, t) {
        if (Array.prototype.reduce || (Array.prototype.reduce = function(e) {
            if (null === this)
                throw new TypeError("Array.prototype.reduce called on null or undefined");
            if ("function" != typeof e)
                throw new TypeError(e + " is not a function");
            var t, r = Object(this), i = r.length >>> 0, n = 0;
            if (2 == arguments.length)
                t = arguments[1];
            else {
                for (; n < i && !(n in r); )
                    n++;
                if (i <= n)
                    throw new TypeError("Reduce of empty array with no initial value");
                t = r[n++]
            }
            for (; n < i; n++)
                n in r && (t = e(t, r[n], n, r));
            return t
        }
        ),
        !KgUser.IsEmpty(e)) {
            var r = null;
            try {
                r = e.split(".").reduce(function(e, t) {
                    return e[t]
                }, window)
            } catch (e) {
                r = null
            }
            "function" == typeof r && r(t)
        }
    },
    GetSmsCode: function(n, o) {
        var s, a = "";
        if (KgUser.IsEmpty(n.appid) || KgUser.IsEmpty(KgUser.Trim(n.mobile)))
            return KgUser.GetMsg(o, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        KgUser.IsEmpty(n.type) && (n.type = "reg"),
        s = n.appid,
        a = KgUser.Trim(n.mobile).toString(),
        type = KgUser.Trim(n.type),
        verifycode = n.verifycode,
        KgUser.IsEmpty(verifycode) && (verifycode = "");
        var g = 5;
        if (KgUser.IsEmpty(n.businessid) || (g = n.businessid),
        type)
            switch (type) {
            case "bind":
                g = 2;
                break;
            case "verify_old":
                g = 4;
                break;
            case "other":
                g = 8;
                break;
            case "reg":
                g = 1
            }
        var c, d = KgUser.getPlat(s);
        KgUser.getDfidAsyn(s, function(e) {
            c = e;
            var e = parseInt((new Date).getTime())
              , i = {
                appid: s,
                clientver: 1e3,
                clienttime: e,
                mid: KgUser.getKgMid(),
                uuid: KgUser.getKgMid(),
                dfid: c
            }
              , t = {
                mobile: a
            }
              , t = AES.encrypt(JSON.stringify(t))
              , r = {
                plat: d,
                clienttime_ms: e,
                businessid: g,
                pk: RSA.encrypt(JSON.stringify({
                    clienttime_ms: e,
                    key: t.key
                })),
                params: t.encryptedStr,
                mobile: a.substring(0, 2) + "********" + a.substring(10, 11)
            };
            getInterFaceKguser(i, r, {
                useH5: !0,
                postType: "json",
                callback: function(e) {
                    i = e;
                    e = KgUser.objectToGetParams(i);
                    KgUser.sentPostRequest("https://gateway.kugou.com/v8/send_mobile_code?" + e, r, function(e, t) {
                        try {
                            e = JSON.parse(e)
                        } catch (e) {}
                        var r;
                        0 == e.status && t.getResponseHeader("SSA-CODE") ? (r = t.getResponseHeader("SSA-CODE"),
                        t = t.getResponseHeader("SSA-HMID"),
                        r ? "PC" == KgUser.getClientType() ? KgUser.antiBrush({
                            eventid: r,
                            userid: 0,
                            appid: s,
                            mid: t || i.mid,
                            url: window.location.href,
                            allowMultipleInit: !0,
                            callback: function(e) {
                                1 == e.status && KgUser.GetSmsCode(n, o)
                            }
                        }) : KgUser.antiBrushH5({
                            eventid: r,
                            userid: 0,
                            appid: s,
                            mid: t || i.mid,
                            url: window.location.href,
                            openWith: "iframe",
                            callback: function(e) {
                                1 == e.status && KgUser.GetSmsCode(n, o)
                            }
                        }) : KgUser.GetMsg(o, {
                            status: e.status,
                            errorCode: e.error_code,
                            errorMsg: e.data
                        })) : KgUser.GetMsg(o, {
                            status: e.status,
                            errorCode: e.error_code,
                            errorMsg: e.data
                        })
                    }, [{
                        key: "x-router",
                        value: "loginservice.kugou.com"
                    }])
                }
            })
        })
    },
    getClientType: function() {
        return window.external && window.external.superCall || navigator.userAgent.match(/kugouandroid/gi) ? "KG_ANDROID" : window.navigator.userAgent.match(/KGBrowser/gi) ? "KG_IOS" : /(iPhone|iPad|iPod|iOS)/i.test(window.navigator.userAgent) ? "IOS" : /(Android)/i.test(window.navigator.userAgent) ? "ANDROID" : "PC"
    },
    RegByUserName: function(e, t) {
        var r, i, n, o, s = 1, a = 1, g = "", c = "", d = "", u = "";
        if (1 == KgUser.CodeAll.codetype && (e.code = KgUser.CodeAll.cval),
        KgUser.IsEmpty(e.appid) || KgUser.IsEmpty(KgUser.Trim(e.username)) || KgUser.IsEmpty(KgUser.Trim(e.password)))
            return KgUser.GetMsg(t, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        if (KgUser.IsEmpty(KgUser.Trim(e.code)) && 2 != KgUser.CodeAll.codetype)
            return KgUser.GetMsg(t, {
                errorCode: "20010",
                errorMsg: "验证码不能为空"
            }),
            !1;
        r = e.appid,
        n = KgUser.Trim(e.username),
        o = KgUser.Trim(e.password),
        i = KgUser.Trim(e.code),
        KgUser.IsEmpty(e.expire_day) || (s = e.expire_day),
        void 0 !== e.sex && null != e.sex && (a = e.sex),
        g = KgUser.IsEmpty(KgUser.Trim(e.nickname)) ? n : KgUser.Trim(e.nickname),
        KgUser.IsEmpty(KgUser.Trim(e.security_email)) || (c = KgUser.Trim(e.security_email)),
        KgUser.IsEmpty(KgUser.Trim(e.id_card)) || (d = KgUser.Trim(e.id_card)),
        KgUser.IsEmpty(KgUser.Trim(e.truename)) || (u = KgUser.Trim(e.truename));
        var l, p = KgUser.getPlat(r);
        KgUser.getDfidAsyn(r, function(e) {
            l = e;
            e = {
                regtype: "username",
                appid: r,
                code: encodeURIComponent(i),
                expire_day: s,
                v: 1,
                username: encodeURIComponent(n),
                sex: a,
                password: KgUser.Md5(o),
                nickname: encodeURIComponent(g),
                security_email: encodeURIComponent(c),
                id_card: encodeURIComponent(d),
                truename: encodeURIComponent(u),
                callback: t,
                codetype: KgUser.CodeAll.codetype,
                plat: p,
                dfid: l
            };
            2 == KgUser.CodeAll.codetype && void 0 !== KgUser.$C("geetest_challenge", "", "input")[0] && (e.geetest_challenge = KgUser.$C("geetest_challenge", KgUser.CodeAll.codeid, "input")[0].value,
            e.geetest_validate = KgUser.$C("geetest_validate", KgUser.CodeAll.codeid, "input")[0].value,
            e.geetest_seccode = KgUser.$C("geetest_seccode", KgUser.CodeAll.codeid, "input")[0].value),
            KgUser.loadScript(KgUser.KgUrl.login + "v2/reg", e)
        })
    },
    RegByMobile: function(t, r) {
        window.saveTempInfoObj = KgUser.JSON.parse(KgUser.JSON.stringify(t));
        var i, n = 1, o = 1, s = "", a = "", g = t.appid, c = KgUser.Trim(t.mobile), d = KgUser.Trim(t.code), u = {}, l = void 0 === t.mid ? "" : t.mid, p = void 0 === t.type ? "" : t.type, f = KgUser.getPlat(g);
        KgUser.getDfidAsyn(g, function(e) {
            i = e;
            e = "tempCallbackName";
            if ("" == p) {
                if (KgUser.IsEmpty(KgUser.Trim(t.password)))
                    return KgUser.GetMsg(r, {
                        errorCode: "20010",
                        errorMsg: "必填参数不能为空"
                    }),
                    !1;
                s = KgUser.Trim(t.password),
                KgUser.IsEmpty(t.expire_day) || (n = t.expire_day),
                void 0 !== t.sex && null != t.sex && (o = t.sex),
                a = KgUser.IsEmpty(KgUser.Trim(t.nickname)) ? c : KgUser.Trim(t.nickname),
                u = {
                    regtype: "mobile",
                    appid: g,
                    code: encodeURIComponent(d),
                    expire_day: n,
                    mobile: encodeURIComponent(c),
                    sex: o,
                    password: KgUser.Md5(s),
                    nickname: encodeURIComponent(a),
                    error: t.error,
                    callback: e,
                    mid: l,
                    plat: f,
                    dfid: i
                }
            } else
                u = {
                    regtype: "mobile",
                    appid: g,
                    code: encodeURIComponent(d),
                    mobile: encodeURIComponent(c),
                    callback: e,
                    error: t.error,
                    type: p,
                    mid: l,
                    plat: f,
                    dfid: i
                };
            window.tempCallbackName = function(e) {
                20028 == e.errorCode ? 1001 == g ? KgUser.antiBrushPCCLient({
                    eventid: e.eventid,
                    userid: 0,
                    appid: 1001,
                    mid: e.mid,
                    url: window.location.href,
                    callback: function(e) {
                        1 == e.status && KgUser.RegByMobile(window.saveTempInfoObj, r)
                    }
                }) : 1058 == g ? (localStorage.setItem("_RIS_PH", c),
                localStorage.setItem("_RIS_PS", s),
                KgUser.antiBrushH5({
                    eventid: e.eventid,
                    userid: 0,
                    appid: 1058,
                    mid: e.mid,
                    url: window.location.href,
                    callback: function(e) {
                        e.status
                    }
                })) : KgUser.antiBrush({
                    eventid: e.eventid,
                    userid: 0,
                    appid: g,
                    mid: e.mid,
                    url: window.location.href,
                    callback: function(e) {
                        1 == e.status && KgUser.RegByMobile(window.saveTempInfoObj, r)
                    }
                }) : KgUser.GetMsg(r, e)
            }
            ,
            KgUser.loadScript(KgUser.KgUrl.login + "v2/reg", u)
        })
    },
    RegByEmail: function(e, r) {
        var i, n, o, s, a = 1, g = 1, c = "";
        if (1 == KgUser.CodeAll.codetype && (e.code = KgUser.CodeAll.cval),
        KgUser.IsEmpty(e.appid) || KgUser.IsEmpty(KgUser.Trim(e.email)) || KgUser.IsEmpty(KgUser.Trim(e.password)))
            return KgUser.GetMsg(r, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        if (KgUser.IsEmpty(KgUser.Trim(e.code)) && 2 != KgUser.CodeAll.codetype)
            return KgUser.GetMsg(r, {
                errorCode: "20010",
                errorMsg: "验证码不能为空"
            }),
            !1;
        i = e.appid,
        o = KgUser.Trim(e.email),
        s = KgUser.Trim(e.password),
        n = KgUser.Trim(e.code),
        KgUser.IsEmpty(e.expire_day) || (a = e.expire_day),
        void 0 !== e.sex && null != e.sex && (g = e.sex);
        var c = KgUser.IsEmpty(KgUser.Trim(e.nickname)) ? o : KgUser.Trim(e.nickname)
          , d = KgUser.getPlat(i);
        KgUser.getDfidAsyn(i, function(e) {
            var t = {
                regtype: "email",
                appid: i,
                code: encodeURIComponent(n),
                expire_day: a,
                email: encodeURIComponent(o),
                sex: g,
                password: KgUser.Md5(s),
                nickname: encodeURIComponent(c),
                callback: r,
                codetype: KgUser.CodeAll.codetype,
                plat: d,
                dfid: ""
            };
            2 == KgUser.CodeAll.codetype && void 0 !== KgUser.$C("geetest_challenge", "", "input")[0] && (t.geetest_challenge = KgUser.$C("geetest_challenge", KgUser.CodeAll.codeid, "input")[0].value,
            t.geetest_validate = KgUser.$C("geetest_validate", KgUser.CodeAll.codeid, "input")[0].value,
            t.geetest_seccode = KgUser.$C("geetest_seccode", KgUser.CodeAll.codeid, "input")[0].value),
            KgUser.loadScript(KgUser.KgUrl.login + "v2/reg/", t)
        })
    },
    CheckPwd: function(e, t) {
        var r, i, n = "";
        if (KgUser.IsEmpty(e.appid) || KgUser.IsEmpty(KgUser.Trim(e.password)))
            return KgUser.GetMsg(t, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        r = e.appid,
        i = KgUser.Trim(e.password),
        KgUser.IsEmpty(KgUser.Trim(e.username)) || (n = KgUser.Trim(e.username));
        e = {
            appid: r,
            str: KgUser.Md5(i),
            username: encodeURIComponent(n),
            callback: t
        };
        KgUser.loadScript(KgUser.KgUrl.user + "check_str/", e)
    },
    CheckReg: function(e, t) {
        setTimeout(function() {
            KgUser.GetMsg(t, {
                data: 0
            })
        }, 200)
    },
    ThirdCode: function(e, t) {
        var r, i, o, s, a;
        KgUser.IsEmpty(KgUser.Trim(e.url)) || KgUser.IsEmpty(KgUser.Trim(e.id)) || (r = e.url,
        i = e.id,
        window.gt_thirdcode = (o = window,
        s = document,
        a = s.getElementsByTagName("head")[0],
        function(r, e) {
            r.protocol = r.https ? "https://" : "http://";
            function i() {
                e(new o.Geetest(r))
            }
            function t() {
                var e = s.createElement("script")
                  , t = (e.id = "gt_lib",
                e.src = r.protocol + "static.geetest.com/static/js/geetest.0.0.0.js",
                e.charset = "UTF-8",
                e.type = "text/javascript",
                a.appendChild(e),
                !1);
                e.onload = e.onreadystatechange = function() {
                    t || this.readyState && "loaded" !== this.readyState && "complete" !== this.readyState || (i(),
                    t = !0)
                }
            }
            var n;
            o.geetest_callback = function() {
                i()
            }
            ,
            r && (r.offline ? t() : o.Geetest ? i() : ((n = s.createElement("script")).onerror = function() {
                r.offline = !0,
                t()
            }
            ,
            n.src = r.protocol + "api.geetest.com/get.php?callback=geetest_callback",
            a.appendChild(n)))
        }
        ),
        KgUser.IsEmpty(KgUser.Trim(i)) || (KgUser.loadScript(r, ""),
        window.gt_succCallback = function(e) {
            void 0 !== KgUser.$(i) && (KgUser.$(i).innerHTML = ""),
            e.appendTo("#" + i),
            e.onSuccess(t)
        }
        ))
    },
    CodeAll: {
        kg_sudoku_anslist: ["", "", "", ""],
        kg_sudoku_flag: 0,
        codetype: 0,
        cval: "",
        appid: 0,
        codeid: ""
    },
    SudokuCode: function(e, d) {
        if (!KgUser.IsEmpty(KgUser.Trim(e.url)) && !KgUser.IsEmpty(KgUser.Trim(e.id))) {
            KgUser.CodeAll.cval = "",
            KgUser.CodeAll.kg_sudoku_anslist = ["", "", "", ""],
            KgUser.CodeAll.kg_sudoku_flag = 0;
            for (var t = document.createElement("link"), r = document.head || document.getElementsByTagName("head")[0], r = (t.type = "text/css",
            t.rel = "stylesheet",
            t.href = KgUser.KgUrl.verify + "v1/static/css/sudoku.css",
            t.id = "kg_sudoku_css",
            void 0 !== document.getElementById("kg_sudoku_css") && null != document.getElementById("kg_sudoku_css") || r.appendChild(t),
            e.url), t = e.id, u = e.appid, e = (KgUser.CodeAll.appid = u,
            ".kg_sudoku_val_add b,.kg_sudoku_input_show span,.kg_sudoku_val_input a b{background:url(" + r + ") no-repeat  -500px -500px;} .kg_sudoku_input_show span{background-position:0 0;}"), e = (KgUser.LoadCss(e, "kg_sudoku_style"),
            ['<div id="kg_sudoku_com" class="kg_sudoku_com">', '<div class="kg_sudoku_val_add kg_sudoku_clearfix" id="kg_sudoku_val_add">', "<b></b>", "<b></b>", "<b></b>", "<b></b>", '<b class="kg_sudoku_delete" title="清除" onclick="KgUser.DelSudokuCode(1);"></b>', '<div id="kg_sudoku_msg" class="kg_sudoku_msg"></div>', "</div>", '<div class="kg_sudoku_input_show"><span></span><a onclick="KgUser.ChangeSudokuCode(\'' + r + "',1)\">看不清,换一张?</a></div>", '<div class="kg_sudoku_ation">点击框内文字输入上图中对应<i>汉字</i></div>', '<div class="kg_sudoku_val_input kg_sudoku_clearfix" id="kg_sudoku_val_input">', '<a href="javascript:;"><b id="kg_sudoku_v_0"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_1"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_2"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_3"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_4"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_5"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_6"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_7"></b></a>', '<a href="javascript:;"><b id="kg_sudoku_v_8"></b></a>', "</div>", "</div>"].join("")), r = (document.getElementById(t).innerHTML = e,
            "kg_sudoku_val_input"), i = document.getElementById(r).getElementsByTagName("b"), n = 0; n < i.length; n++)
                i[n].onclick = function() {
                    c_val = parseInt(this.id.replace("kg_sudoku_v_", "")) + 1,
                    i = this.id,
                    e = "backgroundPosition",
                    i = document.getElementById(i),
                    r = document.documentMode;
                    for (var e, t, r = ("backgroundPosition" == e && 10 == r ? i.currentStyle.backgroundPositionX + " " + i.currentStyle.backgroundPositionY : i.currentStyle ? i.currentStyle[e] : window.getComputedStyle ? (propprop = e.replace(/([A-Z])/g, "-$1"),
                    propprop = e.toLowerCase(),
                    document.defaultView.getComputedStyle(i, null)[e]) : void 0).split(" "), i = "", n = (t = KgUser.IsEmpty(r[0]) ? t : parseInt(r[0].replace("px")) - 3) + "px " + (i = KgUser.IsEmpty(r[1]) ? i : parseInt(r[1].replace("px")) - 5) + "px", o = c_val, s = KgUser.CodeAll.kg_sudoku_anslist, a = KgUser.CodeAll.kg_sudoku_flag, g = document.getElementById("kg_sudoku_val_add").getElementsByTagName("b"), c = 0; c < s.length; c++)
                        if ("" == s[c]) {
                            s[c] = o,
                            g[c].style.cssText = "background-position:" + n,
                            a = c;
                            break
                        }
                    3 == a && (KgUser.CodeAll.cval = s.join(""),
                    setTimeout(function() {
                        KgUser.CheckCode({
                            appid: u,
                            code: KgUser.CodeAll.cval,
                            type: "RegCheckCode",
                            blurCallback: d
                        }, "KgUser.CheckSudoCode")
                    }, 100))
                }
        }
    },
    ChangeSudokuCode: function(t, r) {
        setTimeout(function() {
            var e = ".kg_sudoku_val_add b,.kg_sudoku_input_show span,.kg_sudoku_val_input a b{background:url(" + t + "&nt=" + (new Date).getTime() + ") no-repeat -500px -500px;}  .kg_sudoku_input_show span{background-position:0 0;}";
            KgUser.LoadCss(e, "kg_sudoku_style"),
            KgUser.DelSudokuCode(r)
        }, 200)
    },
    DelSudokuCode: function(e) {
        KgUser.CodeAll.cval = "",
        KgUser.CodeAll.kg_sudoku_flag = 0,
        KgUser.CodeAll.kg_sudoku_anslist = ["", "", "", ""];
        for (var t = document.getElementById("kg_sudoku_val_add").getElementsByTagName("b"), r = 0; r < t.length; r++)
            t[r].style.cssText = "";
        1 == e && (document.getElementById("kg_sudoku_msg").className = "kg_sudoku_msg")
    },
    CheckSudoCode: function(e) {
        var t = "";
        KgUser.IsEmpty(e.errorCode) ? (t = "kg_sudoku_msg success",
        document.getElementById("kg_sudoku_msg").className = t) : (t = "kg_sudoku_msg fail",
        document.getElementById("kg_sudoku_msg").className = t,
        e = KgUser.KgUrl.verify + "v1/get_img_code?type=RegCheckCode&appid=" + KgUser.CodeAll.appid + "&codetype=1&t=" + (new Date).getTime(),
        KgUser.ChangeSudokuCode(e, 0))
    },
    CheckCode: function(e, t) {
        var r, i, n = parseInt((new Date).getTime() / 1e3), o = "LoginCheckCode", s = "";
        if (KgUser.IsEmpty(e.appid))
            return KgUser.GetMsg(t, {
                errorCode: "20010",
                errorMsg: "必填参数不能为空"
            }),
            !1;
        KgUser.IsEmpty(KgUser.Trim(e.code)) || (i = KgUser.Trim(e.code),
        r = e.appid,
        KgUser.IsEmpty(KgUser.Trim(e.type)) || (o = KgUser.Trim(e.type)),
        KgUser.IsEmpty(e.blurCallback) || (s = e.blurCallback),
        e = {
            appid: r,
            ct: n,
            code: encodeURIComponent(i),
            type: encodeURIComponent(o),
            callback: t
        },
        KgUser.loadScript(KgUser.KgUrl.login + "v1/check_img_code", e, s))
    },
    Md5: function(e) {
        var o = 0
          , s = 8;
        function a(e, t, r, i, n, o) {
            return m((t = m(m(t, e), m(i, o))) << n | t >>> 32 - n, r)
        }
        function u(e, t, r, i, n, o, s) {
            return a(t & r | ~t & i, e, t, n, o, s)
        }
        function l(e, t, r, i, n, o, s) {
            return a(t & i | r & ~i, e, t, n, o, s)
        }
        function p(e, t, r, i, n, o, s) {
            return a(t ^ r ^ i, e, t, n, o, s)
        }
        function f(e, t, r, i, n, o, s) {
            return a(r ^ (t | ~i), e, t, n, o, s)
        }
        function m(e, t) {
            var r = (65535 & e) + (65535 & t);
            return (e >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r
        }
        return e = e ? function(e) {
            for (var t = function(e, t) {
                e[t >> 5] |= 128 << t % 32,
                e[14 + (t + 64 >>> 9 << 4)] = t;
                for (var r = 1732584193, i = -271733879, n = -1732584194, o = 271733878, s = 0; s < e.length; s += 16) {
                    var a = r
                      , g = i
                      , c = n
                      , d = o;
                    r = u(r, i, n, o, e[s + 0], 7, -680876936),
                    o = u(o, r, i, n, e[s + 1], 12, -389564586),
                    n = u(n, o, r, i, e[s + 2], 17, 606105819),
                    i = u(i, n, o, r, e[s + 3], 22, -1044525330),
                    r = u(r, i, n, o, e[s + 4], 7, -176418897),
                    o = u(o, r, i, n, e[s + 5], 12, 1200080426),
                    n = u(n, o, r, i, e[s + 6], 17, -1473231341),
                    i = u(i, n, o, r, e[s + 7], 22, -45705983),
                    r = u(r, i, n, o, e[s + 8], 7, 1770035416),
                    o = u(o, r, i, n, e[s + 9], 12, -1958414417),
                    n = u(n, o, r, i, e[s + 10], 17, -42063),
                    i = u(i, n, o, r, e[s + 11], 22, -1990404162),
                    r = u(r, i, n, o, e[s + 12], 7, 1804603682),
                    o = u(o, r, i, n, e[s + 13], 12, -40341101),
                    n = u(n, o, r, i, e[s + 14], 17, -1502002290),
                    i = u(i, n, o, r, e[s + 15], 22, 1236535329),
                    r = l(r, i, n, o, e[s + 1], 5, -165796510),
                    o = l(o, r, i, n, e[s + 6], 9, -1069501632),
                    n = l(n, o, r, i, e[s + 11], 14, 643717713),
                    i = l(i, n, o, r, e[s + 0], 20, -373897302),
                    r = l(r, i, n, o, e[s + 5], 5, -701558691),
                    o = l(o, r, i, n, e[s + 10], 9, 38016083),
                    n = l(n, o, r, i, e[s + 15], 14, -660478335),
                    i = l(i, n, o, r, e[s + 4], 20, -405537848),
                    r = l(r, i, n, o, e[s + 9], 5, 568446438),
                    o = l(o, r, i, n, e[s + 14], 9, -1019803690),
                    n = l(n, o, r, i, e[s + 3], 14, -187363961),
                    i = l(i, n, o, r, e[s + 8], 20, 1163531501),
                    r = l(r, i, n, o, e[s + 13], 5, -1444681467),
                    o = l(o, r, i, n, e[s + 2], 9, -51403784),
                    n = l(n, o, r, i, e[s + 7], 14, 1735328473),
                    i = l(i, n, o, r, e[s + 12], 20, -1926607734),
                    r = p(r, i, n, o, e[s + 5], 4, -378558),
                    o = p(o, r, i, n, e[s + 8], 11, -2022574463),
                    n = p(n, o, r, i, e[s + 11], 16, 1839030562),
                    i = p(i, n, o, r, e[s + 14], 23, -35309556),
                    r = p(r, i, n, o, e[s + 1], 4, -1530992060),
                    o = p(o, r, i, n, e[s + 4], 11, 1272893353),
                    n = p(n, o, r, i, e[s + 7], 16, -155497632),
                    i = p(i, n, o, r, e[s + 10], 23, -1094730640),
                    r = p(r, i, n, o, e[s + 13], 4, 681279174),
                    o = p(o, r, i, n, e[s + 0], 11, -358537222),
                    n = p(n, o, r, i, e[s + 3], 16, -722521979),
                    i = p(i, n, o, r, e[s + 6], 23, 76029189),
                    r = p(r, i, n, o, e[s + 9], 4, -640364487),
                    o = p(o, r, i, n, e[s + 12], 11, -421815835),
                    n = p(n, o, r, i, e[s + 15], 16, 530742520),
                    i = p(i, n, o, r, e[s + 2], 23, -995338651),
                    r = f(r, i, n, o, e[s + 0], 6, -198630844),
                    o = f(o, r, i, n, e[s + 7], 10, 1126891415),
                    n = f(n, o, r, i, e[s + 14], 15, -1416354905),
                    i = f(i, n, o, r, e[s + 5], 21, -57434055),
                    r = f(r, i, n, o, e[s + 12], 6, 1700485571),
                    o = f(o, r, i, n, e[s + 3], 10, -1894986606),
                    n = f(n, o, r, i, e[s + 10], 15, -1051523),
                    i = f(i, n, o, r, e[s + 1], 21, -2054922799),
                    r = f(r, i, n, o, e[s + 8], 6, 1873313359),
                    o = f(o, r, i, n, e[s + 15], 10, -30611744),
                    n = f(n, o, r, i, e[s + 6], 15, -1560198380),
                    i = f(i, n, o, r, e[s + 13], 21, 1309151649),
                    r = f(r, i, n, o, e[s + 4], 6, -145523070),
                    o = f(o, r, i, n, e[s + 11], 10, -1120210379),
                    n = f(n, o, r, i, e[s + 2], 15, 718787259),
                    i = f(i, n, o, r, e[s + 9], 21, -343485551),
                    r = m(r, a),
                    i = m(i, g),
                    n = m(n, c),
                    o = m(o, d)
                }
                return Array(r, i, n, o)
            }(function(e) {
                for (var t = Array(), r = (1 << s) - 1, i = 0; i < e.length * s; i += s)
                    t[i >> 5] |= (e.charCodeAt(i / s) & r) << i % 32;
                return t
            }(e), e.length * s), r = o ? "0123456789ABCDEF" : "0123456789abcdef", i = "", n = 0; n < 4 * t.length; n++)
                i += r.charAt(t[n >> 2] >> n % 4 * 8 + 4 & 15) + r.charAt(t[n >> 2] >> n % 4 * 8 & 15);
            return i
        }(e) : ""
    },
    Trim: function(e) {
        return "string" == typeof e ? e.replace(/^\s+|\s+$/g, "") : e
    },
    IsEmpty: function(e) {
        return void 0 === e || null == e || "" == e
    },
    GetBytes: function() {
        for (var e = 0, t = 0; t < this.length; t++)
            256 < this.charCodeAt(t) ? e += 2 : e += 1;
        return e
    },
    Intercept: function(e, t) {
        var r = this;
        if ((r = r.trim()).getBytes() < e)
            return r;
        var i = 0
          , n = 0;
        0 < t.length && (e -= t.length);
        for (var o = 0; o < r.length && (256 < this.charCodeAt(o) ? i += 2 : i += 1,
        !(e < i)); o++)
            n++;
        return r.substr(0, n) + t
    },
    Guid: function() {
        function e() {
            return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
        }
        return e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e()
    },
    CheckAutoLogin: function() {
        KgUser.Cookie.read("KuGoo", "KugooID");
        var e = KgUser.Cookie.read("KuGoo", "ct");
        86400 < parseInt((new Date).getTime() / 1e3) - e && KgUser.AutoLogin("")
    },
    LoginQRCodeImgObject: null,
    GetQRCode: function(n, t, o, s, a, g, c, d, r) {
        var i, u = "", u = "";
        u = r && r.h5url ? r.h5url + "?appid=" + n + "&" : KgUser.KgUrl.qrcodeH5 + "?appid=" + n + "&",
        r && r.name && (u = u + "name=" + r.name + "&");
        KgUser.getDfidAsyn(n, function(e) {
            i = e;
            e = {
                appid: n,
                clientver: t,
                clienttime: parseInt((new Date).getTime()),
                mid: KgUser.getKgMid(),
                uuid: KgUser.getKgMid(),
                dfid: i,
                type: 1,
                plat: KgUser.getPlat(n),
                type: r && r.type || 1,
                qrcode_txt: u
            };
            r && 2 == r.type && r.tmeid && (e.tmeid = r.tmeid),
            getInterFaceKguser(e, null, function(e) {
                e.qrcode_txt && (e.qrcode_txt = encodeURIComponent(e.qrcode_txt));
                e = KgUser.objectToGetParams(e);
                KgUser.sentGetRequest(KgUser.KgUrl.login + "v2/qrcode", e, function(e) {
                    var t = e;
                    try {
                        t = KgUser.JSON.parse(e)
                    } catch (e) {}
                    var r = {};
                    if (1 != t.status || KgUser.IsEmpty(t.data.qrcode))
                        r.status = 0,
                        r.data = {
                            appid: n,
                            qrcode: null
                        },
                        r.error_code = t.error_code,
                        d && d(KgUser.JSON.stringify(r));
                    else if (KgUser.QRCodeState = 1,
                    u = u + "qrcode=" + t.data.qrcode,
                    t.data && t.data.qrcode_img) {
                        e = o;
                        try {
                            e.innerHTML = "";
                            var i = document.createElement("img");
                            i.setAttribute("id", "qrcodeImgEle_" + t.data.qrcode),
                            i.setAttribute("src", t.data.qrcode_img),
                            i.setAttribute("alt", "登录二维码"),
                            i.setAttribute("style", "width: " + s + "px"),
                            e.appendChild(i),
                            r.status = 1,
                            r.data = {
                                appid: n,
                                qrcode: t.data.qrcode
                            },
                            r.error_code = 0,
                            d && d(KgUser.JSON.stringify(r))
                        } catch (e) {
                            console.debug("err: ", e)
                        }
                    } else
                        KgUser.loadScript("https://staticssl.kugou.com/common/js/min/login/qrcode.min.js", null, function() {
                            setTimeout(function() {
                                if (KgUser.LoginQRCodeImgObject && KgUser.LoginQRCodeImgObject.makeCode && KgUser.LoginQRCodeImgObject._el == o)
                                    try {
                                        KgUser.LoginQRCodeImgObject.clear(),
                                        KgUser.LoginQRCodeImgObject.makeCode && KgUser.LoginQRCodeImgObject.makeCode(u)
                                    } catch (e) {}
                                else {
                                    try {
                                        KgUser.LoginQRCodeImgObject.clear()
                                    } catch (e) {}
                                    KgUser.LoginQRCodeImgObject = new QRCode(o,{
                                        text: u,
                                        width: s,
                                        height: a,
                                        colorDark: g,
                                        colorLight: c,
                                        correctLevel: QRCode.CorrectLevel.L
                                    })
                                }
                                o.removeAttribute("title"),
                                r.status = 1,
                                r.data = {
                                    appid: n,
                                    qrcode: t.data.qrcode
                                },
                                r.error_code = 0,
                                d && d(KgUser.JSON.stringify(r))
                            }, 100)
                        })
                })
            })
        })
    },
    GetQRCodeStateTimer: null,
    GetQRCodeStatePollingTime: 0,
    QRCodeState: 1,
    GetQRCodeState: function(r, o, s, a, e) {
        function g(t, i, n) {
            var e;
            4 == (e = KgUser.QRCodeState) || 0 == e ? clearTimeout(KgUser.GetQRCodeStateTimer) : (e = 1e3,
            60 < KgUser.GetQRCodeStatePollingTime && (e = 5e3),
            KgUser.GetQRCodeStateTimer = setTimeout(function() {
                KgUser.GetQRCodeStatePollingTime++,
                KgUser.getDfidAsyn(r, function(e) {
                    t = e;
                    e = {
                        appid: r,
                        clientver: o,
                        clienttime: parseInt((new Date).getTime()),
                        mid: KgUser.getKgMid(),
                        uuid: KgUser.getKgMid(),
                        dfid: t,
                        plat: KgUser.getPlat(r),
                        qrcode: s
                    };
                    getInterFaceKguser(e, null, function(e) {
                        e = KgUser.objectToGetParams(e);
                        KgUser.sentGetRequest(KgUser.KgUrl.login + "v2/get_userinfo_qrcode", e, function(t) {
                            var r = "";
                            try {
                                r = KgUser.JSON.parse(t)
                            } catch (e) {
                                r = t
                            }
                            1 == r.status && (KgUser.QRCodeState = r.data.status,
                            g(0, i, n)),
                            a && a(t)
                        })
                    })
                })
            }, e))
        }
        var t, i, n;
        null != KgUser.GetQRCodeStateTimer && (clearTimeout(KgUser.GetQRCodeStateTimer),
        KgUser.GetQRCodeStatePollingTime = 0),
        1 != (n = KgUser.QRCodeState) && 2 != n || (t = KgUser.getPlat(r),
        i = KgUser.getKgMid(),
        KgUser.getDfidAsyn(r, function(e) {
            g(0, i, t)
        }))
    },
    ClearGetQRCodeStateTimer: function() {
        clearTimeout(KgUser.GetQRCodeStateTimer)
    },
    QRCodeLogin: function(n, o, s, a, r) {
        var g, c = parseInt((new Date).getTime()), d = parseInt((new Date).getTime() / 1e3);
        KgUser.getDfidAsyn(n, function(e) {
            g = e;
            var i = {
                appid: n,
                clientver: r && r.clientver || "1000",
                clienttime: d,
                mid: KgUser.getKgMid(),
                uuid: KgUser.getKgMid(),
                dfid: g,
                dev: "web",
                userid: o,
                plat: KgUser.getPlat(n),
                clienttime_ms: c
            };
            r && r.expire_day && (i.expire_day = expire_day);
            var e = AES.encrypt(JSON.stringify({
                token: s
            }))
              , t = RSA.encrypt(JSON.stringify({
                clienttime_ms: c,
                key: e.key
            }));
            i.pk = t,
            i.params = e.encryptedStr,
            getInterFaceKguser(i, null, function(e) {
                e = KgUser.objectToGetParams(e);
                KgUser.sentPostRequest(KgUser.KgUrl.cross + "v1/login_by_token_get?" + e, null, function(t, e) {
                    try {
                        t = JSON.parse(t)
                    } catch (e) {}
                    var r;
                    t && 0 == t.status && e.getResponseHeader("SSA-CODE") ? (r = e.getResponseHeader("SSA-CODE"),
                    e = e.getResponseHeader("SSA-HMID"),
                    r ? "PC" == KgUser.getClientType() ? KgUser.antiBrush({
                        eventid: r,
                        userid: 0,
                        appid: n,
                        mid: e || i.mid,
                        url: window.location.href,
                        allowMultipleInit: !0,
                        callback: function(e) {
                            1 == e.status ? KgUser.QRCodeLogin(n, o, s, a) : KgUser.GetMsg(a, {
                                status: 0,
                                error_code: t && t.error_code,
                                data: "请先进行验证"
                            })
                        }
                    }) : KgUser.antiBrushH5({
                        eventid: r,
                        userid: 0,
                        appid: n,
                        mid: e || i.mid,
                        url: window.location.href,
                        openWith: "iframe",
                        callback: function(e) {
                            1 == e.status ? KgUser.GetSmsCode(n, o, s, a) : KgUser.GetMsg(a, {
                                status: 0,
                                error_code: t && t.error_code,
                                data: "请先进行验证"
                            })
                        }
                    }) : KgUser.GetMsg(a, t)) : KgUser.GetMsg(a, t)
                }, null, {
                    withCredentials: !0
                })
            })
        })
    },
    sentGetRequest: function(t, r, i) {
        var n, o = null, s = !1, a = !1, e = t.split("/");
        if (e.length <= 2)
            args.error && args.error(KgUser.KgErrType.param);
        else {
            var g = e[2]
              , c = "login-user.kugou.com" == g ? !0 : !1;
            if (window.XMLHttpRequest && !window.ActiveXObject)
                n = new XMLHttpRequest;
            else if (window.ActiveXObject)
                try {
                    n = new ActiveXObject("Microsoft.XMLHTTP")
                } catch (e) {
                    try {
                        n = new ActiveXObject("Msxml2.XMLHTTP")
                    } catch (e) {
                        n = null
                    }
                }
            n.open("GET", t + "?" + r, !0),
            n.send(null),
            n.onreadystatechange = function() {
                var e;
                4 == n.readyState && (200 <= (e = n.status) && e < 300 || 304 == e ? (a = !0,
                clearTimeout(o),
                i(n.responseText, n)) : c ? s || (clearTimeout(o),
                n.abort(),
                KgUser.sentGetRequestRetry(t, g, r, i)) : i(e, n))
            }
            ,
            c && (o = setTimeout(function() {
                a || (s = !0,
                n.abort(),
                KgUser.sentGetRequestRetry(t, g, r, i))
            }, 3500))
        }
    },
    sentPostRequest: function(t, r, i, n, e) {
        var o, s = null, a = !1, g = !1, c = t.split("/");
        if (c.length <= 2)
            args.error && args.error(KgUser.KgErrType.param);
        else {
            var d = c[2]
              , u = "login-user.kugou.com" == d ? !0 : !1;
            if (window.XMLHttpRequest && !window.ActiveXObject)
                o = new XMLHttpRequest;
            else if (window.ActiveXObject)
                try {
                    o = new ActiveXObject("Microsoft.XMLHTTP")
                } catch (e) {
                    try {
                        o = new ActiveXObject("Msxml2.XMLHTTP")
                    } catch (e) {
                        o = null
                    }
                }
            if (o.open("POST", t, !0),
            e && e.withCredentials && (o.withCredentials = !0),
            !KgUser.IsEmpty(n))
                for (var l = 0, p = n.length; l < p; l++)
                    o.setRequestHeader(n[l].key, n[l].value);
            KgUser.IsEmpty(r) ? o.send(null) : o.send(JSON.stringify(r)),
            o.onreadystatechange = function() {
                var e;
                4 == o.readyState && (200 <= (e = o.status) && e < 300 || 304 == e ? (g = !0,
                clearTimeout(s),
                i(o.responseText, o)) : u ? a || (clearTimeout(s),
                o.abort(),
                KgUser.sentPostRequestRetry(t, d, r, i, n)) : i(e))
            }
            ,
            u && (s = setTimeout(function() {
                g || (a = !0,
                o.abort(),
                KgUser.sentPostRequestRetry(t, d, r, i, n))
            }, 3500))
        }
    },
    loginDRRetry: function(e, t, r, i) {
        var n = "login-user.kugou.com"
          , o = "loginuserretry.kugou.com";
        KgUser.IsEmpty(o) || (KgUser.isAckHost(KgUser.KgUrl.login, n) || (KgUser.KgUrl.login = KgUser.KgUrl.login.replace(n, o),
        KgUser.KgUrl.loginHTTP = KgUser.KgUrl.loginHTTP.replace(n, o)),
        e = e.replace(t, o),
        KgUser.loadScriptN(e, r, i))
    },
    sentGetRequestRetry: function(e, t, r, i) {
        var n = "login-user.kugou.com"
          , o = "loginuserretry.kugou.com";
        KgUser.IsEmpty(o) || (KgUser.isAckHost(KgUser.KgUrl.login, n) || (KgUser.KgUrl.login = KgUser.KgUrl.login.replace(n, o),
        KgUser.KgUrl.loginHTTP = KgUser.KgUrl.loginHTTP.replace(n, o)),
        e = e.replace(t, o),
        KgUser.sentGetRequest(e, r, i))
    },
    sentPostRequestRetry: function(e, t, r, i, n) {
        var o = "login-user.kugou.com"
          , s = "loginuserretry.kugou.com";
        KgUser.IsEmpty(s) || (KgUser.isAckHost(KgUser.KgUrl.login, o) || (KgUser.KgUrl.login = KgUser.KgUrl.login.replace(o, s),
        KgUser.KgUrl.loginHTTP = KgUser.KgUrl.loginHTTP.replace(o, s)),
        e = e.replace(t, s),
        KgUser.sentPostRequest(e, r, i, n))
    },
    antiBrush: function(t) {
        if (!KgUser.IsEmpty(t.eventid) && !KgUser.IsEmpty(t.appid)) {
            var r = "kgAntiBrush" + Math.random().toString().substring(5);
            t.callback ? window[r] = t.callback : window[r] = function() {
                return null
            }
            ;
            try {
                jQuery || KgUser.loadScript("https://staticssl.kugou.com/common/js/min/jquery-2.1.4.min.js", null)
            } catch (e) {
                KgUser.loadScript("https://staticssl.kugou.com/common/js/min/jquery-2.1.4.min.js", null)
            }
            try {
                verifyObject.init(t.appid, t.mid, t.userid, t.eventid, r, t.allowMultipleInit)
            } catch (e) {
                KgUser.loadScript("https://staticssl.kugou.com/verify/static/js/verify.min.js?20200707", null, function() {
                    setTimeout(function() {
                        verifyObject.init(t.appid, t.mid, t.userid, t.eventid, r, t.allowMultipleInit)
                    }, 100)
                })
            }
        }
    },
    antiBrushH5: function(t) {
        var e, r, i;
        KgUser.IsEmpty(t.eventid) || KgUser.IsEmpty(t.appid) ? console.error("请输入正确的参数。eventid 和 appid 不允许为空！") : (r = t.url || "https://m3ws.kugou.com",
        r = encodeURIComponent(r),
        e = "https://h5.kugou.com/apps/verify-h5/dist/#/index/" + t.eventid + "/" + t.appid + "/" + r + "/" + t.mid,
        r = "kgAntiBrush" + Math.random().toString().substring(5),
        i = r,
        window.kgAntiBrushH5CallbackName = r,
        t.callback ? window[window.kgAntiBrushH5CallbackName] = function(e) {
            try {
                e = JSON.parse(e)
            } catch (e) {}
            t.callback && t.callback(e),
            window[window.kgAntiBrushH5CallbackName] = null
        }
        : window[window.kgAntiBrushH5CallbackName] = function() {
            return null
        }
        ,
        t.openWith && "iframe" == t.openWith ? KgUser.loadScript("https://staticssl.kugou.com/common/js/min/npm/light-mobilecall-iframe.min.js", null, function() {
            var t = document.getElementById("kgVerifyPopupBg");
            if (t)
                return null;
            e = e + "/" + window.kgAntiBrushH5CallbackName,
            (t = document.createElement("div")).id = "kgVerifyPopupBg",
            t.style.position = "fixed",
            t.style.top = "0",
            t.style.left = "0",
            t.style.width = "100%",
            t.style.height = "100%",
            t.style.zIndex = "99999",
            t.style.zIndex = "99999",
            t.style.backgroundColor = "#ffffff",
            t.innerHTML = '<div style="position: absolute; top: 5px; right: 5px; width: 0.4rem; height: 0.4rem; background: url() no-repeat; -webkit-background-size: cover; background-size: cover; background-repeat: no-repeat;" id="kgVerifyPopupBgClose"></div><iframe id="kgVerifyPopupBgCont" style="width:100%; height:100%;" frameborder="0" src="' + e + '"></iframe>',
            document.body.appendChild(t),
            window.postMessage && !window.kgVerifyMessaageListener && (window.kgVerifyMessaageListener = !0,
            addEventListener("message", function(r) {
                var e, i = document.getElementById("kgVerifyPopupBgCont");
                if ("https://h5.kugou.com" === r.origin) {
                    if ("kgVerifyCallbackData" == r.data.type) {
                        try {
                            window[window.kgAntiBrushH5CallbackName](r.data.dataJson || {
                                status: 0
                            })
                        } catch (e) {}
                        try {
                            i.src = "about:blank",
                            i.contentWindow.document.write(""),
                            i.contentWindow.document.clear(),
                            i.parentNode.removeChild(i)
                        } catch (r) {}
                        try {
                            (t = document.getElementById("kgVerifyPopupBg")) && t.parentNode.removeChild(t)
                        } catch (e) {}
                    }
                    if ("KgMobileCall" == r.data.type && LightMobileCall.isInClient() && (e = null,
                    r.data.dataJson && (e = JSON.parse(r.data.dataJson)),
                    LightMobileCall.mobileCall(r.data.cmd, e, function(e) {
                        if (r.data.cbName) {
                            var t = e;
                            try {
                                t = JSON.stringify(e)
                            } catch (e) {}
                            i.contentWindow.postMessage({
                                type: r.data.type,
                                cbName: r.data.cbName,
                                dataJson: t
                            }, "*")
                        }
                    })),
                    "KgWebMobileCall" == r.data.type && LightMobileCall.isInClient()) {
                        var n = r.data.funcName;
                        if (n)
                            try {
                                var o = n.split(".");
                                o.reduce(function(e, t) {
                                    var r;
                                    return e[t] ? t === o[o.length - 1] ? "function" == typeof (r = e[t]) ? (e[t] = function(e) {
                                        r && r(e),
                                        i.contentWindow.postMessage({
                                            type: "KgWebMobileCall",
                                            funcName: n,
                                            dataJson: e
                                        }, "*")
                                    }
                                    ,
                                    e[t]) : null : e[t] : (t === o[o.length - 1] ? e[t] = function(e) {
                                        i.contentWindow.postMessage({
                                            type: "KgWebMobileCall",
                                            funcName: n,
                                            dataJson: e
                                        }, "*")
                                    }
                                    : e[t] = new Object,
                                    e[t])
                                }, window)
                            } catch (r) {}
                    }
                }
            })),
            document.getElementById("kgVerifyPopupBgClose").addEventListener("click", function() {
                window[i]({
                    status: 0,
                    error_code: 301,
                    error_msg: "请先完成安全验证"
                });
                var e = document.getElementById("kgVerifyPopupBgCont");
                try {
                    e.src = "about:blank",
                    e.contentWindow.document.write(""),
                    e.contentWindow.document.clear(),
                    e.parentNode.removeChild(e)
                } catch (e) {}
                try {
                    t.parentNode.removeChild(t)
                } catch (e) {}
            })
        }) : window.location.replace(e))
    },
    antiBrushPCCLient: function(t) {
        if (!KgUser.IsEmpty(t.eventid)) {
            var r = "kgAntiBrush" + Math.random().toString().substring(5);
            t.callback ? window[r] = t.callback : window[r] = function() {
                return null
            }
            ;
            try {
                jQuery ? i(function() {
                    n(t.eventid, r)
                }) : KgUser.loadScript("https://staticssl.kugou.com/common/js/min/jquery-2.1.4.min.js", null, function() {
                    i(function() {
                        n(t.eventid, r)
                    })
                })
            } catch (e) {
                KgUser.loadScript("https://staticssl.kugou.com/common/js/min/jquery-2.1.4.min.js", null, function() {
                    i(function() {
                        n(t.eventid, r)
                    })
                })
            }
            function i(t) {
                try {
                    riskCtrl ? t && t() : KgUser.loadScript("https://staticssl.kugou.com/common/js/min/riskCtrl.min.js", null, function() {
                        t && t()
                    })
                } catch (e) {
                    KgUser.loadScript("https://staticssl.kugou.com/common/js/min/riskCtrl.min.js", null, function() {
                        t && t()
                    })
                }
            }
            function n(e, t) {
                try {
                    riskCtrl.init({
                        eventId: e,
                        callback: function(e) {
                            window[t](e)
                        }
                    })
                } catch (e) {}
            }
        }
    },
    getDfid: function(e) {
        return KgUser.Cookie.read("kg_dfid")
    },
    getDfidInClient: function(e, t) {
        if (1001 == e) {
            var r = function(e) {
                "string" == typeof e && (e = JSON.parse(e)),
                dfid = (dfid = e.dfid) || "",
                t && t(dfid)
            }
              , i = "KGSupercall_GetUserInfo" + Math.random().toString().substr(2, 9)
              , e = null;
            window[i] = function(e) {
                r && r(e),
                window[i] = null
            }
            ;
            try {
                e = external.SuperCall(504, '{"callback":"' + i + '"}')
            } catch (e) {}
            void 0 !== e && r ? window[i](e) : r || (window[i] = null)
        }
    },
    getDfidAsyn: function(e, t) {
        var r = "";
        1001 == e ? KgUser.getDfidInClient(e, function(e) {
            r = e,
            t && t(r)
        }) : (r = KgUser.getDfid(e),
        t && t(r))
    },
    getPlat: function(e) {
        return 1001 == e ? 3 : 4
    },
    getKgMid: function() {
        var e = KgUser.Cookie.read(KgUser.KgMid.name)
          , t = ""
          , r = (window.Storage && window.localStorage && window.localStorage instanceof Storage && (t = window.localStorage.getItem(KgUser.KgMid.name)),
        e || t);
        if (e && e != t && window.localStorage.setItem(KgUser.KgMid.name, e),
        !e && t && KgUser.Cookie.write(KgUser.KgMid.name, t, 86400 * KgUser.KgMid.days, "/", KgUser.GetDomain(), !0, "None"),
        navigator.cookieEnabled) {
            if (KgUser.IsEmpty(r)) {
                e = KgUser.Guid(),
                r = KgUser.Md5(e);
                try {
                    KgUser.Cookie.write(KgUser.KgMid.name, KgUser.Md5(e), 86400 * KgUser.KgMid.days, "/", KgUser.GetDomain(), !0, "None"),
                    window.localStorage.setItem(KgUser.KgMid.name, KgUser.Md5(e))
                } catch (e) {}
            }
        } else {
            var t = navigator.userAgent
              , e = function() {
                var e = navigator.plugins
                  , t = "";
                if (0 < e.length) {
                    for (var r = [], i = 0, n = e.length; i < n; i++) {
                        var o = e[i].name;
                        r.push(o)
                    }
                    t = r.toString()
                }
                return t
            }()
              , i = screen.width + "x" + screen.height
              , n = screen.colorDepth || ""
              , o = screen.pixelDepth || ""
              , s = function() {
                var e = ["canvas"];
                try {
                    var t, r = document.createElement("canvas");
                    r.getContext && r.getContext("2d") && (r.width = 200,
                    r.height = 200,
                    r.style.display = "inline",
                    (t = r.getContext("2d")).rect(0, 0, 10, 10),
                    t.rect(2, 2, 6, 6),
                    e.push("canvas winding:" + (!1 === t.isPointInPath(5, 5, "evenodd") ? "yes" : "no")),
                    t.textBaseline = "alphabetic",
                    t.fillStyle = "#f60",
                    t.fillRect(125, 1, 62, 20),
                    t.fillStyle = "#069",
                    t.font = "14px 'Arial'",
                    t.fillText("hello kugou", 2, 15),
                    t.fillStyle = "rgba(102, 204, 0, 0.2)",
                    t.font = "18pt Arial",
                    t.fillText("hello kugou", 4, 45),
                    t.globalCompositeOperation = "multiply",
                    t.fillStyle = "rgb(255,0,255)",
                    t.beginPath(),
                    t.arc(50, 50, 50, 0, 2 * Math.PI, !0),
                    t.closePath(),
                    t.fill(),
                    t.fillStyle = "rgb(0,255,255)",
                    t.beginPath(),
                    t.arc(100, 50, 50, 0, 2 * Math.PI, !0),
                    t.closePath(),
                    t.fill(),
                    t.fillStyle = "rgb(255,255,0)",
                    t.beginPath(),
                    t.arc(75, 100, 50, 0, 2 * Math.PI, !0),
                    t.closePath(),
                    t.fill(),
                    t.fillStyle = "rgb(255,0,255)",
                    t.arc(75, 75, 75, 0, 2 * Math.PI, !0),
                    t.arc(75, 75, 25, 0, 2 * Math.PI, !0),
                    t.fill("evenodd"),
                    r.toDataURL && e.push("canvas fp:" + r.toDataURL()))
                } catch (e) {}
                return KgUser.Md5(e.toString())
            }();
            r = KgUser.Md5(t + e + i + n + o + s)
        }
        return r
    }
}
  , m_val = KgUser.Cookie.read(KgUser.KgMid.name);
KgUser.Cookie.remove("kg_mid_temp"),
KgUser.Cookie.write("kg_mid_temp", m_val, 300, "/", KgUser.GetDomain()),
KgUser.getKgMid(),
"kugou.com" != KgUser.GetDomain() ? KgUser.CrossDomainLogin("") : KgUser.CheckAutoLogin();
try {
    document.execCommand("BackgroundImageCache", !1, !0)
} catch (e) {}
KgUser.loadAckJs();
